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_1 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 570A0C43461 for ; Wed, 16 Sep 2020 21:03:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 094C5206D4 for ; Wed, 16 Sep 2020 21:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbgIPVCg (ORCPT ); Wed, 16 Sep 2020 17:02:36 -0400 Received: from foss.arm.com ([217.140.110.172]:33468 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgIPQPR (ORCPT ); Wed, 16 Sep 2020 12:15:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66F0114F6; Wed, 16 Sep 2020 07:09:22 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 30EEB3F68F; Wed, 16 Sep 2020 07:09:21 -0700 (PDT) Date: Wed, 16 Sep 2020 15:09:14 +0100 From: Lorenzo Pieralisi To: Jason Gunthorpe Cc: Benjamin Herrenschmidt , Clint Sbisa , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, Leon Romanovsky Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs Message-ID: <20200916140914.GA20770@e121166-lin.cambridge.arm.com> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916121226.GN1573713@nvidia.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, Sep 16, 2020 at 09:12:26AM -0300, Jason Gunthorpe wrote: [...] > > 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 For my own information, this is IB user space driver code, correct ? It tries to mmap buffer as WC and if it succeeds write into it in an optimized fashion (that is just pure overhead on platforms where normal NC memory - ie WC on arm64 - does not do what the _architecture_ defines it should). Lorenzo 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_1 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 EF54FC43461 for ; Wed, 16 Sep 2020 14:10:56 +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 60E4E22242 for ; Wed, 16 Sep 2020 14:10:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q3p0omgs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60E4E22242 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pjC83xo903woQmVLBU/jZ2GV6HEXTItuPiA+BQtrhrg=; b=q3p0omgsgFMa+OHmnUdBGQTId I68hdhoJCh0goYb+lVp6VIL2eUfUIGBkQaQmmFjbsoRL2uwp7S7x810EFV8e53WaJlXaElHkwCWAo ZZ+r0G4Dw0xor0RGC397+Xp4GQ8gzzyLX25THPplvnUjkFz53tD/vvPuSGSQKqhADxwmiZI5y1uye FsOdCd90QHGsTo709F8+v79sYdwvh7Mrarq+ykGfl/GSi7ymPCaXzXEZfB/V3FOQToF41WZBR3ENW ZVMT8EXKa2e+PbRnYkrSj82fiVS4acp0MWdu/F38ljbY/a0QX6iX4Xm7DXwbxjwBUUHznqij7fwJO hxdKQC5oA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIY7j-000207-LP; Wed, 16 Sep 2020 14:09:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIY7h-0001zl-Ih for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 14:09:26 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66F0114F6; Wed, 16 Sep 2020 07:09:22 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 30EEB3F68F; Wed, 16 Sep 2020 07:09:21 -0700 (PDT) Date: Wed, 16 Sep 2020 15:09:14 +0100 From: Lorenzo Pieralisi To: Jason Gunthorpe Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs Message-ID: <20200916140914.GA20770@e121166-lin.cambridge.arm.com> References: <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200916121226.GN1573713@nvidia.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_100925_670965_E805E220 X-CRM114-Status: GOOD ( 11.60 ) 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: catalin.marinas@arm.com, Leon Romanovsky , Benjamin Herrenschmidt , Bjorn Helgaas , linux-pci@vger.kernel.org, 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, Sep 16, 2020 at 09:12:26AM -0300, Jason Gunthorpe wrote: [...] > > 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 For my own information, this is IB user space driver code, correct ? It tries to mmap buffer as WC and if it succeeds write into it in an optimized fashion (that is just pure overhead on platforms where normal NC memory - ie WC on arm64 - does not do what the _architecture_ defines it should). Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel