Received: by 10.192.165.148 with SMTP id m20csp738453imm; Fri, 4 May 2018 05:46:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVkwEo2yuFH002hZsVATrHndelfYeH1STzDHz8S4rO6HT9WD4GjxLfzvPDoVL1YU8Q8iKZ X-Received: by 2002:a63:3c47:: with SMTP id i7-v6mr22269612pgn.254.1525437978113; Fri, 04 May 2018 05:46:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525437978; cv=none; d=google.com; s=arc-20160816; b=M0V31gks9Y6zUg5lOPKsFQ8qgGH4m+/b9rq/T6KOpm/ISmtGjSCgNLkXFyOkvt4ar/ D2GDrreLQabItwkfer/UH83RueBOPe7yfiJJpy2yrAFpHqQtKOfw54fdqQoJ1nbYEGqs qOlv1aYsAwdio9lN5dMBkRhKgcOuzhjMBNvGhh8oEdCDGVrc69JlhSmR4UHwk+e5lu7Z CNY8bePmPx7RQ2Kp1IG1UvoNfUpThudTSp3A3GOcbRixp/n+DLfHHTu+RQqebXDJiNlX OASdXKFWN+Mi4TuxA4+46AXVF0pJgp+nw/RBM9Cz5Gu19Ug8tUVOilMoM6VxUS2vZbcZ fPGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=jBQVEXm70U0Xtu4HkhDb6T72A/BB8EsbThSB/FMUZrA=; b=i/vGNCabPG2n/a/QeemzL9G85TlBbrnUSnWFVILdD+zEDEBopLXziHKIcv9sFSv22F oTzgPe0o4Ld04QsiJrdSXCrFTSOUf5TZasxH4TP46+CnGgOhoT6zlM2gS3i/eukBPHlt 5DHm5Fn+gUe/C4kjPNKeh1h4UDF3SPA7hGlRlTiXXP6W8brfL3/vwJeDkMiKdho0tHHN mkf7Af/hi972uEAQBbilcmcdGE8CNsXW1joPTVjyqp6C5Tq3+kakKxaVHQ9BiiLXmio5 Z8n74f1NJZanLcMMAsPfVYYCRqzh5Mg9q0ZUwyY32uUODbx5ZFHbI3nTyTaZDD+bbCzv QBmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si719840pfn.44.2018.05.04.05.45.49; Fri, 04 May 2018 05:46:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbeEDMph (ORCPT + 99 others); Fri, 4 May 2018 08:45:37 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:54245 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeEDMpe (ORCPT ); Fri, 4 May 2018 08:45:34 -0400 Received: from weser.hi.pengutronix.de ([2001:67c:670:100:fa0f:41ff:fe58:4010]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1fEa5c-0007HD-H2; Fri, 04 May 2018 14:45:32 +0200 Message-ID: <1525437928.3373.16.camel@pengutronix.de> Subject: Re: [Linaro-mm-sig] [PATCH 4/8] dma-buf: add peer2peer flag From: Lucas Stach To: Alex Deucher , Christoph Hellwig Cc: Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Jerome Glisse , amd-gfx list , Dan Williams , Logan Gunthorpe , Christian =?ISO-8859-1?Q?K=F6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" Date: Fri, 04 May 2018 14:45:28 +0200 In-Reply-To: References: <3e17afc5-7d6c-5795-07bd-f23e34cf8d4b@gmail.com> <20180420101755.GA11400@infradead.org> <20180420124625.GA31078@infradead.org> <20180420152111.GR31310@phenom.ffwll.local> <20180424184847.GA3247@infradead.org> <20180425054855.GA17038@infradead.org> <20180425064118.GA28100@infradead.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:fa0f:41ff:fe58:4010 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, den 25.04.2018, 13:44 -0400 schrieb Alex Deucher: > On Wed, Apr 25, 2018 at 2:41 AM, Christoph Hellwig > wrote: > > On Wed, Apr 25, 2018 at 02:24:36AM -0400, Alex Deucher wrote: > > > > It has a non-coherent transaction mode (which the chipset can opt to > > > > not implement and still flush), to make sure the AGP horror show > > > > doesn't happen again and GPU folks are happy with PCIe. That's at > > > > least my understanding from digging around in amd the last time we had > > > > coherency issues between intel and amd gpus. GPUs have some bits > > > > somewhere (in the pagetables, or in the buffer object description > > > > table created by userspace) to control that stuff. > > > > > > Right.  We have a bit in the GPU page table entries that determines > > > whether we snoop the CPU's cache or not. > > > > I can see how that works with the GPU on the same SOC or SOC set as the > > CPU.  But how is that going to work for a GPU that is a plain old PCIe > > card?  The cache snooping in that case is happening in the PCIe root > > complex. > > I'm not a pci expert, but as far as I know, the device sends either a > snooped or non-snooped transaction on the bus.  I think the > transaction descriptor supports a no snoop attribute.  Our GPUs have > supported this feature for probably 20 years if not more, going back > to PCI.  Using non-snooped transactions have lower latency and faster > throughput compared to snooped transactions. PCI-X (as in the thing which as all the rage before PCIe) added a attribute phase to each transaction where the requestor can enable relaxed ordering and/or no-snoop on a transaction basis. As those are strictly performance optimizations the root-complex isn't required to honor those attributes, but implementations that care about performance usually will. Regards, Lucas