From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S1752263AbcLISWe (ORCPT <rfc822;w@1wt.eu>);
        Fri, 9 Dec 2016 13:22:34 -0500
Received: from verein.lst.de ([213.95.11.211]:45240 "EHLO newverein.lst.de"
        rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
        id S1750982AbcLISWc (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
        Fri, 9 Dec 2016 13:22:32 -0500
Date: Fri, 9 Dec 2016 19:22:30 +0100
From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Doug Ledford <dledford@redhat.com>, Christoph Hellwig <hch@lst.de>,
        Sagi Grimberg <sagi@grimberg.me>,
        "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
        David Woodhouse <dwmw2@infradead.org>,
        virtualization@lists.linux-foundation.org, linux-arch@vger.kernel.org,
        linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] Move dma_ops from archdata into struct device
Message-ID: <20161209182230.GC16622@lst.de>
References: <07c07529-4636-fafb-2598-7358d8a1460d@sandisk.com> <58a325aa-8df7-6a2e-fadb-5d9031d8a1a0@sandisk.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <58a325aa-8df7-6a2e-fadb-5d9031d8a1a0@sandisk.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

We'll need a bit of a wieder audience for this I think..

On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote:
> Additionally, introduce set_dma_ops(). A later patch will introduce a
> call to that function in the RDMA drivers that will be modified to use
> dma_noop_ops.

This looks good to me, and we had a lot of talk about this for other
purposes for a while. 

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S932236AbcLITNo (ORCPT <rfc822;w@1wt.eu>);
        Fri, 9 Dec 2016 14:13:44 -0500
Received: from bombadil.infradead.org ([198.137.202.9]:38517 "EHLO
        bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S1753359AbcLITNm (ORCPT
        <rfc822;linux-kernel@vger.kernel.org>);
        Fri, 9 Dec 2016 14:13:42 -0500
Message-ID: <1481310814.98151.11.camel@infradead.org>
Subject: Re: [PATCH 3/5] Move dma_ops from archdata into struct device
From: David Woodhouse <dwmw2@infradead.org>
To: Christoph Hellwig <hch@lst.de>,
        Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Doug Ledford <dledford@redhat.com>, Sagi Grimberg <sagi@grimberg.me>,
        "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
        virtualization@lists.linux-foundation.org, linux-arch@vger.kernel.org,
        linux-kernel@vger.kernel.org
Date: Fri, 09 Dec 2016 19:13:34 +0000
In-Reply-To: <20161209182230.GC16622@lst.de>
References: <07c07529-4636-fafb-2598-7358d8a1460d@sandisk.com>
         <58a325aa-8df7-6a2e-fadb-5d9031d8a1a0@sandisk.com>
         <20161209182230.GC16622@lst.de>
Content-Type: multipart/signed; micalg="sha-256";
        protocol="application/x-pkcs7-signature";
        boundary="=-7RGKpPlL311rf1sa84cV"
X-Mailer: Evolution 3.22.2 (3.22.2-1.fc25) 
Mime-Version: 1.0
X-SRS-Rewrite: SMTP reverse-path rewritten from <dwmw2@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org


--=-7RGKpPlL311rf1sa84cV
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 2016-12-09 at 19:22 +0100, Christoph Hellwig wrote:
> We'll need a bit of a wieder audience for this I think..
>=20
> On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote:
> > Additionally, introduce set_dma_ops(). A later patch will introduce a
> > call to that function in the RDMA drivers that will be modified to use
> > dma_noop_ops.
>=20
> This looks good to me, and we had a lot of talk about this for other
> purposes for a while.=20

Hm, I'm not convinced we want per-device dma_ops. What we want is per-
device IOMMU ops, and any dma_ops are just a generic or platform-
specific (in some cases) wrapper around those. We shouldn't normally
need per-device DMA ops at all.

--=20
dwmw2
--=-7RGKpPlL311rf1sa84cV
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEeAw
ggXiMIIDyqADAgECAhBrp4p9CteI1lEK+Vnk57ThMA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNVBAYT
AklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSswKQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZXJ0
aWZpY2F0ZSBTaWduaW5nMSkwJwYDVQQDEyBTdGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
eTAeFw0xNTEyMTYwMTAwMDVaFw0zMDEyMTYwMTAwMDVaMHUxCzAJBgNVBAYTAklMMRYwFAYDVQQK
Ew1TdGFydENvbSBMdGQuMSkwJwYDVQQLEyBTdGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
eTEjMCEGA1UEAxMaU3RhcnRDb20gQ2xhc3MgMSBDbGllbnQgQ0EwggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQC9fdr3w6J9g/Zbgv3bW1+uHht1wLUZr5gkrLtXedg17AkefMyUGwrQdvwO
bhajcVmnKVxhrUwkZPXRAwZZosRHfEIi5FH7x6SV/8Sp5lZEu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ABIICAK06
ACSFDVjTSNQoAHrQ0HicXSSzmp/Gcjywo/CC5phdPQIWP/lMc2aVWiHAxbLxISRE88m50fp71tKr
rzEkScfoM3wqChnwl+klqyNM/tIRB30YBYY2ys55/mP5aiLv/Ka0rttV6vHVwgiZGs16kZZSYsgI
/LO5xnAZs4NEKiIZRRwhg+wgchjPu7m8olUlGwMOPW0pLQhTXTpxBJdUBGde0oLObqR4siC4h7xa
UnbN/jbLH9L0l55JNP2wPZa3RRmOpFSFp6mKMSIKuQQemb5nyIDBTBqFCNbla9xfTSAeZnyBpUo2
7A59v9EbazZMrmx5eyCoIKgQEyHzaZAkKsB5vFZkheyxZvZZ44W4YVHnslnnEk1VXqp3fFK1kD1z
b20WfrdSQuriaXnM7OFBbYHdht7dPLrFA7mdaSqyCJmR8dF+C9/oSOLWnNEu6CsajhbV9hbcWsuc
TYyMd23+M0faubalwrBnLavnnH++CI1cPHbdBsUNNtZ+ITfo+3QdvW+2dAUDtkqqinu6AO8C44L9
+9DYU+wZw9wn8MUuCCtT09BrJiWljYHh+XFQb9aep3RD7r4CN++vCkgSCPyJzWh4TnelctEJFyiD
Qsn1ms0wwT5Ntye3V0Noze8oCMROVSgV7I6zBPV6xVE2hTbE2wcgymi3cMJZzoIduoFSIxXMAAAA
AAAA


--=-7RGKpPlL311rf1sa84cV--

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S1753370AbcLITqm (ORCPT <rfc822;w@1wt.eu>);
        Fri, 9 Dec 2016 14:46:42 -0500
Received: from mail-sn1nam01on0066.outbound.protection.outlook.com ([104.47.32.66]:53152
        "EHLO NAM01-SN1-obe.outbound.protection.outlook.com"
        rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP
        id S1751388AbcLITqj (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
        Fri, 9 Dec 2016 14:46:39 -0500
Authentication-Results: spf=pass (sender IP is 63.163.107.21)
 smtp.mailfrom=sandisk.com; infradead.org; dkim=none (message not signed)
 header.d=none;infradead.org; dmarc=bestguesspass action=none
 header.from=sandisk.com;
X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:3344;Count:19
X-AuditID: 0ac94369-607ff70000000b53-53-584b07cfc7c7
Subject: Re: [PATCH 3/5] Move dma_ops from archdata into struct device
To: David Woodhouse <dwmw2@infradead.org>, Christoph Hellwig <hch@lst.de>
References: <07c07529-4636-fafb-2598-7358d8a1460d@sandisk.com>
 <58a325aa-8df7-6a2e-fadb-5d9031d8a1a0@sandisk.com>
 <20161209182230.GC16622@lst.de> <1481310814.98151.11.camel@infradead.org>
CC: Doug Ledford <dledford@redhat.com>, Sagi Grimberg <sagi@grimberg.me>,
        "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
        <virtualization@lists.linux-foundation.org>,
        <linux-arch@vger.kernel.org>, <linux-kernel@vger.kernel.org>
From: Bart Van Assche <bart.vanassche@sandisk.com>
Message-ID: <cbfac346-3b71-fffb-65f6-3566a00366a4@sandisk.com>
Date: Fri, 9 Dec 2016 11:46:30 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.5.0
MIME-Version: 1.0
In-Reply-To: <1481310814.98151.11.camel@infradead.org>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42LhOum8SPcSu3eEwYk2bouX5z+wWkxcOZnZ
        YuXqo0wWHbu+slhc3jWHzeLZoV4Wi3Wv37NYLD87j82Bw+P8vY0sHptXaHlMvrGc0WP3zQY2
        j/f7rrJ5fN4kF8AWxWWTkpqTWZZapG+XwJWx+Q5fwUmOiqYfrcwNjE/Zuhg5OSQETCQezTvF
        1MXIxSEksJRJYs+kf+wQzlZGibmt14AcDrCqHdMiIeKLGSUa/jeAdQsLuEkcXjSBGcQWEfCU
        2PP4LtSk/YwS07+fZgNxmAW+MEqs7VgA1sEmYCTx7f1MFhCbV8BO4v7V44wgNouAisSxa0/A
        JokKREj0T3kEVSMocXLmExaQKzgFzCRuHM4CCTMLWEjMnH+eEcKWl9j+dg4zxDsXWSV2PNYF
        sYUE1CVOLpnPNIFReBaSSbOQtM9C0r6AkXkVo1huZk5xbnpqgaGpXnFiXkpmcbZecn7uJkZI
        DGXuYLz7xPsQowAHoxIPr8Mhrwgh1sSy4srcQ4wSHMxKIrzLObwjhHhTEiurUovy44tKc1KL
        DzFKc7AoifO63fsSJiSQnliSmp2aWpBaBJNl4uCUamB0lSifsXnmKc6onYnlKaXPOQ84hnhk
        t+Xr9BwUiv5uf0vy7cLXmu2ab97msbIe09T5ez3q3dH8w++M65sE9da+d+954GX2RN5wbs+J
        hIBXq6dJBZvuETG2nafeYnbrW7Hv7WdTffMfTT86f788Y+hxzbD332aW3+2a+lEm03KnA9u/
        STFJH9qVWIozEg21mIuKEwEufBTXnQIAAA==
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPJMWRmVeSWpSXmKPExsXCtZGTTVeCyzvC4PxVdouX5z+wWkxcOZnZ
        YuXqo0wWHbu+slhc3jWHzeLZoV4Wi3Wv37NYLD87j82Bw+P8vY0sHptXaHlMvrGc0WP3zQY2
        j/f7rrJ5fN4kF8AWxWWTkpqTWZZapG+XwJWx+Q5fwUmOiqYfrcwNjE/Zuhg5OCQETCR2TIvs
        YuTiEBJYyCjRtfIPexcjJ4ewgJvE4UUTmEFsEQFPiT2P7zJBFO1nlJj+/TQbSIJZ4B2jROMf
        URCbTcBI4tv7mSwgNq+AncT9q8cZQWwWARWJY9eegA0SFYiQ6J/yCKpGUOLkzCcsIEdwCphJ
        3DicBTHSTGLe5ofMELa8xPa3c5gnMPLNQtIxC0nZLCRlCxiZVzGK5WbmFOemZxYYGuoVJ+al
        ZBZn6yXn525ihARx5A7GpxPNDzEycXBKNTDqiKuFWUgu+MXKV8fx+X7ml5krFkaWVqqxcJ+v
        nfBO8WaGzZ0aBc+yphveO5gVpbveipw0euOw04DFf711b1n1/9uWif5MxpPSmyzuc5inLpC9
        Lby9XiJxSsbraG+xLm8bsXniKSeL/MViF03b/8lkywmFi9eLOy5Mk9j6p+GP9u018m6VHEos
        xRmJhlrMRcWJAKGxU0ASAgAA
X-IncomingHeaderCount: 19
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-HT: Tenant
X-Forefront-Antispam-Report: CIP:63.163.107.21;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39410400002)(39850400002)(2980300002)(438002)(189002)(377424004)(24454002)(377454003)(199003)(189998001)(69596002)(31696002)(64126003)(47776003)(5660300001)(65826007)(2950100002)(230700001)(33646002)(626004)(229853002)(97736004)(86362001)(2270400002)(50466002)(5001770100001)(38730400001)(36756003)(77096006)(4001350100001)(31686004)(106466001)(65806001)(68736007)(53416004)(65956001)(8936002)(23676002)(356003)(8676002)(83506001)(81166006)(93886004)(4326007)(92566002)(50986999)(76176999)(54356999)(305945005)(2906002)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR02MB114;H:milsmgep15.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD001;1: 
X-MS-Office365-Filtering-Correlation-Id: 4fb90a97-2ab9-471c-6d30-08d4206c1548
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BLUPR02MB114;
X-Microsoft-Exchange-Diagnostics: 1;BLUPR02MB114;3:dY5tJ10LKcMEO4WRbGpmRGh5W6QmfUPnfa1YYi4eqWxpSDPyLPEKtpFRZXMfhpNP8rx2NNymyFNtGYzCCU1cFSke5jkttdUqEPDSbJTG9Cwkt6tkzz5oxJLQOHCmRYRENwt3EJgUT4OEN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02MB11426FEA03FE905DF67F41281870@BLUPR02MB114.namprd02.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148);SRVR:BLUPR02MB114;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB114;
X-Microsoft-Exchange-Diagnostics: 1;BLUPR02MB114;4: 
X-Forefront-PRVS: 015114592F
X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjAyTUIxMTQ7MjM6ZXZaZUVhNFM0M3JRQ2VhOElYZEkzQWNZWTI2?=
 =?utf-8?B?YS9zNnF6VEJnTnprNGRIZXZHZWNIYTlpSXdmTVlXSHdpS2h4UGR1UUlGWDlT?=
 =?utf-8?B?TkF0bG9Zcm4rU2lLdWZKSTczcDZMWFRtdjRzQytQMzByZUhZenJjdVVocDJx?=
 =?utf-8?B?K3FVUUdkSzJnSmxPOVNVMnZFbkJncWlyOVBiN0tCZHRXSTJLRUlST2tGV1Bv?=
 =?utf-8?B?aTU5ZzVyTU1FdzFuWWU4cENOTFVIckx2UGZobHV5VXc3WTBoZy9GRnh6cm9K?=
 =?utf-8?B?SmtwdDJjdDQ3QmJaSHhMTXpTOG01clNtclpuTFgzNXUxUkRnaGZkbkVZaHds?=
 =?utf-8?B?djFtS2YzYVNGRzhiaC9wUEQwNXhkSisxYUx4YVEzTmNDVVlPSkVzWUtPWnZt?=
 =?utf-8?B?L214WVh6VUdBUUYxMnhVWnZPdU8xREwramRwMDNHOHVlcTdBYWFxdjV4K1Za?=
 =?utf-8?B?Z3JWeldaMkpVVGhYQ1psTXUwTkFtUmJWZWtNS2hGemowMHFNR0pyNm1YdXZh?=
 =?utf-8?B?N3FRMHJRNldzY3ZRNlk1S3hwOThpSG5WaW16WDhhZFhySnFNNzVlK0hEe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MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2016 19:46:35.0927
 (UTC)
X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.21];Helo=[milsmgep15.sandisk.com]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB114
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 12/09/2016 11:13 AM, David Woodhouse wrote:
> On Fri, 2016-12-09 at 19:22 +0100, Christoph Hellwig wrote:
>> We'll need a bit of a wieder audience for this I think..
>>
>> On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote:
>>> Additionally, introduce set_dma_ops(). A later patch will introduce a
>>> call to that function in the RDMA drivers that will be modified to use
>>> dma_noop_ops.
>>
>> This looks good to me, and we had a lot of talk about this for other
>> purposes for a while.
>
> Hm, I'm not convinced we want per-device dma_ops. What we want is per-
> device IOMMU ops, and any dma_ops are just a generic or platform-
> specific (in some cases) wrapper around those. We shouldn't normally
> need per-device DMA ops at all.

Hello David,

Can you recommend an approach for e.g. the qib driver 
(drivers/infiniband/hw/qib)? That driver uses the CPU (PIO) instead of 
DMA to transfer data to a PCIe device. Sorry but I don't see how 
per-device IOMMU ops would allow to avoid that e.g. a cache flush is 
triggered before PIO starts.

Bart.

