Received: by 10.192.165.148 with SMTP id m20csp1043919imm; Wed, 25 Apr 2018 11:39:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+KSoYJyG43tatAFFuW70fSkTsb4eZpB5XxwRE8MKJWJcfzIh8OH76+mIAgqrd9jzbmkOTB X-Received: by 10.98.47.2 with SMTP id v2mr25312999pfv.239.1524681562516; Wed, 25 Apr 2018 11:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524681562; cv=none; d=google.com; s=arc-20160816; b=CadNsrWvKhq26+pHLhTF16uUo6NhkZ/cTCg2IICmSiYd7FhQclog+ShNQYdm0ZIlH9 HuM2jZkylpOhuAGBCQggylxIckBhTO5goZJ8tERpAhEAosD+9PyonKPeJbTiPa76dE5e EMoB78ZPXxkPfv5WQSbAMZd/ljD79/KbYoishSBUkVSgLIxoZITJFLOjY24/JfIrloRM tDwKnZg/cyxxBv13OSPccsHRIdkdzRGcigIidc9Mgkc0mv1tnb3uQ+OgZ9dqPUCMITgL X+9VHFDa0lqedUjmJsfgHX6lDMK219rEz/Z3EfK4SH/KZT22D/GtfYDeWbvApGMohMu+ U8Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=YkZCzPjKOLGpdGAoGpxU1XzumT2eoSUJyR04+7XPCZQ=; b=MQ/pJtMOdHhjcgMWm1frrkzG9Mx4PkWpjdpNr0gMTjBbl4ru24UxNrepW7epj3pN0J jYFUmqoqGoPbEpcD/2iP/LVzaTV0bAtFAzhNfozXIwkqw0oheeyEbIRpRblJxjtzzdch k58RPUDFVw96PPFHGWcb3H9v++7f7ilnjQ6idy13i0ZTzR94bIt2YjwnxssGdho2srPA rx2bYdWnm2s3IXh3bsBj7n1QFmQ2eqcPMTSZpVMOv0iUnScw/w91FfUmpVlbqYWROTJL JCV7uDrg2iXPcGRZBzjPq/wkpMHbMiSmmaN3YOSlstYYBZbEEIuh8OPvoHG2o9rDzLvr EFdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DJ+Ffi18; 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 p11-v6si20268585plo.276.2018.04.25.11.39.08; Wed, 25 Apr 2018 11:39:22 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DJ+Ffi18; 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 S1756086AbeDYSiG (ORCPT + 99 others); Wed, 25 Apr 2018 14:38:06 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:44916 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751084AbeDYSiE (ORCPT ); Wed, 25 Apr 2018 14:38:04 -0400 Received: by mail-oi0-f46.google.com with SMTP id e80-v6so14332911oig.11 for ; Wed, 25 Apr 2018 11:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YkZCzPjKOLGpdGAoGpxU1XzumT2eoSUJyR04+7XPCZQ=; b=DJ+Ffi18y3d/a67Z2S95VUamXnm+gptKT+cPYMzJu19AJjKda8hs1Jmt1FEhEB1Md6 1U84n145T0fX31B5FcOAWEvFTwl1Y4WNU2UngzmmfHhYf8yTZ5Iojxzl0G0c3/2QOnGJ aiE22/mEC4jmsKU3xvHcwQOLsbxhdvWaXj/I3iw0pHUNNRtdsY2EP43o+vZIIs3kfa1w VFxTKRnsyk1AeGs0QE9QVCODRfvE07OMn9kU5pUv8uktIpe+pcHEUZzegSlulvAXrl/Z ZCzfe9Rlsj6mQhx2WqEc90Ws2qbww/iZtbRu+/Vs6To/f/okTb5/lmwGx42Z4oscmQ2z uO+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YkZCzPjKOLGpdGAoGpxU1XzumT2eoSUJyR04+7XPCZQ=; b=IhTdBoJD8M/SMFMWfrr4628ORNZA3huGo/xTDNK98j5I5XyHfY7yIaozEUNwiHucNp G7bASDdHpentDKMKvImm+9y+MOOM1XCLKO6Sa7XOVCqJsIaDM1/q7iJcoZe8+MdkNw+e IkNg7ZG4KPJRJ9JXNHUX9f07OTEbnjhs+C7A+ljtXMQ5iJbzifdwJv+YYs1rGVyN0uFC BQy7nVS2tUaDx7A7WXPfxnoETe98tNdCR2xEC3LOwUKsuHZdNJhYXGjf2TkL5wrMptih zN/qep06lS5npx+nlX668GpBZgVojb1H7EwObywNpRqEsRI4a4i/pcwzc86jNndqQO7Y AUYA== X-Gm-Message-State: ALQs6tAr3RGy9Php2E9doKwkS5X5GK1MOfvx6wWkLakFCt+potstplR8 pc3GO+DQ9y4Nf5UiUX1FNtizuXL7ru1ytU4hh8N32A== X-Received: by 2002:aca:dd06:: with SMTP id u6-v6mr17493215oig.295.1524681484421; Wed, 25 Apr 2018 11:38:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d36:0:0:0:0:0 with HTTP; Wed, 25 Apr 2018 11:38:03 -0700 (PDT) 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> From: Dan Williams Date: Wed, 25 Apr 2018 11:38:03 -0700 Message-ID: Subject: Re: [Linaro-mm-sig] [PATCH 4/8] dma-buf: add peer2peer flag To: Alex Deucher Cc: Christoph Hellwig , Daniel Vetter , Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Jerome Glisse , amd-gfx list , Logan Gunthorpe , =?UTF-8?Q?Christian_K=C3=B6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 25, 2018 at 10:44 AM, Alex Deucher wrote: > 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. Right, 'no snoop' and 'relaxed ordering' have been part of the PCI spec since forever. With a plain old PCI-E card the root complex indeed arranges for caches to be snooped. Although it's not always faster depending on the platform. 'No snoop' traffic may be relegated to less bus resources relative to the much more common snooped traffic.