[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190116161134.GA29041@lst.de>
Date: Wed, 16 Jan 2019 17:11:34 +0100
From: "hch@....de" <hch@....de>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Thomas Hellstrom <thellstrom@...are.com>,
"hch@....de" <hch@....de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"yong.zhi@...el.com" <yong.zhi@...el.com>,
"daniel.vetter@...ll.ch" <daniel.vetter@...ll.ch>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"syeh@...are.com" <syeh@...are.com>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"bingbu.cao@...el.com" <bingbu.cao@...el.com>,
"imre.deak@...el.com" <imre.deak@...el.com>,
"tian.shu.qiu@...el.com" <tian.shu.qiu@...el.com>,
"jian.xu.zheng@...el.com" <jian.xu.zheng@...el.com>,
"shiraz.saleem@...el.com" <shiraz.saleem@...el.com>,
"sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] lib/scatterlist: Provide a DMA page iterator
On Tue, Jan 15, 2019 at 02:25:01PM -0700, Jason Gunthorpe wrote:
> RDMA needs something similar as well, in this case drivers take a
> struct page * from get_user_pages() and need to have the DMA map fail
> if the platform can't DMA map in a way that does not require any
> additional DMA API calls to ensure coherence. (think Userspace RDMA
> MR's)
Any time you dma map pages you need to do further DMA API calls to
ensure coherent, that is the way it is implemented. These calls
just happen to be no-ops sometimes.
> Today we just do the normal DMA map and when it randomly doesn't work
> and corrupts data tell those people their platforms don't support RDMA
> - it would be nice to have a safer API base solution..
Now that all these drivers are consolidated in rdma-core you can fix
the code to actually do the right thing. It isn't that userspace DMA
coherent is any harder than in-kernel DMA coherenence. It just is
that no one bothered to do it properly.
Powered by blists - more mailing lists