From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E0A1C433E2 for ; Thu, 17 Sep 2020 00:30:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17658206C9 for ; Thu, 17 Sep 2020 00:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726011AbgIQAa0 (ORCPT ); Wed, 16 Sep 2020 20:30:26 -0400 Received: from kernel.crashing.org ([76.164.61.194]:41098 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgIQAaZ (ORCPT ); Wed, 16 Sep 2020 20:30:25 -0400 X-Greylist: delayed 901 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 Sep 2020 20:30:23 EDT Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 08GNxT6I030187 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Sep 2020 18:59:32 -0500 Message-ID: <28082ccc715a9fba349ae6052d5c917ae02d40fa.camel@kernel.crashing.org> Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs From: Benjamin Herrenschmidt To: Jason Gunthorpe Cc: Lorenzo Pieralisi , Clint Sbisa , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, Leon Romanovsky Date: Thu, 17 Sep 2020 09:59:28 +1000 In-Reply-To: <20200916121226.GN1573713@nvidia.com> References: <20200914143819.GC904879@nvidia.com> <375c478593945a416f3180c3773bcb5240d2e36c.camel@kernel.crashing.org> <1d6f2ceb8d3538c906a1fdb8cd3d4c74ccffa42e.camel@kernel.crashing.org> <20200914225740.GP904879@nvidia.com> <2b539df4c9ec703458e46da2fc879ee3b310b31c.camel@kernel.crashing.org> <20200915101831.GA2616@e121166-lin.cambridge.arm.com> <20200915110511.GQ904879@nvidia.com> <20200915234006.GI1573713@nvidia.com> <701012f288231d0d0733bf1c2c8fdbd9caa074fd.camel@kernel.crashing.org> <20200916121226.GN1573713@nvidia.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, 2020-09-16 at 09:12 -0300, Jason Gunthorpe wrote: > > Also we could make this a variable rather than a constant and > > choose > > a more appropriate set of flags at boot time.... > > It is a function, so it could check the CPU ID for the known broken > devices and block them. Sure, I meant in the abstract way. It's not a hot path so it doesnt have to be a static key. > > > > Why would that be a regression ? > > > > > > Using the WC submission flow when it doesn't work costs something > > > like > > > 10% performance vs using the non-WC flow. > > > > You mean the driver uses a different path to the HW which ahs that > > overhead, not that MMIOs have that overhead right ? > > The different path has overhead of doing extra useless MMIOs because > they don't combine I see. This might have to end up being a TX2 specific hack until the end of times... Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA24AC43461 for ; Thu, 17 Sep 2020 00:01:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81B382072E for ; Thu, 17 Sep 2020 00:01:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="w5fdxMFm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81B382072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CUA4A+fIJ799qIpJw3snSrwnYCghgaNwZWpb8K1MjJE=; b=w5fdxMFmGBwDg5oRtzyUBkadv sBHB8aIDOu6BwJsJDUYYoZqQrx/WeXhRMHxDI5XzM1vOry+AmmMazlx18NkYW/v0AwMzS4E/zDdkE YO+oGfuSpRtH9jZ1hN4Y8yhy2D7v+4S860Juc+NBad7p9OaZItPPcHHKwyzdKyuQx3f9Jpa5JnnsY 2ARvvGO6Zclj3W5WfOeSoM3JPV8z45/9CrpgLSvyaDqi6Eg7VMHGl+FHaKUbLkOiVSr/V73zFha99 yCKoCPHKvpZ3uwD0kC2tYQfcfY7UoQJ4dVFc/XdI7gP+BNFO1x+72nz45ja2o/ylK6/cbU7+lk/Mc eafd9R3Bg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIhLB-0006lE-NJ; Wed, 16 Sep 2020 23:59:57 +0000 Received: from kernel.crashing.org ([76.164.61.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIhL8-0006kG-Ko for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 23:59:55 +0000 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 08GNxT6I030187 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Sep 2020 18:59:32 -0500 Message-ID: <28082ccc715a9fba349ae6052d5c917ae02d40fa.camel@kernel.crashing.org> Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs From: Benjamin Herrenschmidt To: Jason Gunthorpe Date: Thu, 17 Sep 2020 09:59:28 +1000 In-Reply-To: <20200916121226.GN1573713@nvidia.com> References: <20200914143819.GC904879@nvidia.com> <375c478593945a416f3180c3773bcb5240d2e36c.camel@kernel.crashing.org> <1d6f2ceb8d3538c906a1fdb8cd3d4c74ccffa42e.camel@kernel.crashing.org> <20200914225740.GP904879@nvidia.com> <2b539df4c9ec703458e46da2fc879ee3b310b31c.camel@kernel.crashing.org> <20200915101831.GA2616@e121166-lin.cambridge.arm.com> <20200915110511.GQ904879@nvidia.com> <20200915234006.GI1573713@nvidia.com> <701012f288231d0d0733bf1c2c8fdbd9caa074fd.camel@kernel.crashing.org> <20200916121226.GN1573713@nvidia.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_195954_855837_40A72E11 X-CRM114-Status: GOOD ( 17.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Leon Romanovsky , linux-pci@vger.kernel.org, Bjorn Helgaas , catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, Clint Sbisa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 2020-09-16 at 09:12 -0300, Jason Gunthorpe wrote: > > Also we could make this a variable rather than a constant and > > choose > > a more appropriate set of flags at boot time.... > > It is a function, so it could check the CPU ID for the known broken > devices and block them. Sure, I meant in the abstract way. It's not a hot path so it doesnt have to be a static key. > > > > Why would that be a regression ? > > > > > > Using the WC submission flow when it doesn't work costs something > > > like > > > 10% performance vs using the non-WC flow. > > > > You mean the driver uses a different path to the HW which ahs that > > overhead, not that MMIOs have that overhead right ? > > The different path has overhead of doing extra useless MMIOs because > they don't combine I see. This might have to end up being a TX2 specific hack until the end of times... Cheers, Ben. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel