[lkml]   [2019]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

 \ /
  Last update: 2019-01-16 17:12    [W:0.134 / U:5.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site