lkml.org 
[lkml]   [2019]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] swiotlb: sync buffer when mapping FROM_DEVICE
From
Date
On 22/05/2019 13:32, Christoph Hellwig wrote:
> I'm a little worried about this. While it looks functionally correct
> we have surived without it, and doing another copy for every swiotlb
> dma mapping from the device looks extremely painful for the typical use
> cases where we expect the device to transfer the whole mapping.
>
> I'd be tempted to instead properl document the current behavior and
> introduce a new DMA_ATTR_PARTIAL flag to allow for partial mappings.

Would that work out any different from the existing
DMA_ATTR_SKIP_CPU_SYNC? If drivers are prepared to handle this issue
from their end, they can already do so for single mappings by using that
attr along with explicit partial syncs via dma_sync_single(). For
page/sg mappings we'd still have the problem of identifying what part of
"partial" actually matters, and probably having to add some additional
new sync operations to cope.

Robin.

\
 
 \ /
  Last update: 2019-05-22 14:51    [W:0.049 / U:1.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site