> On May 21, 2018, at 12:49 PM, Jaromír Doleček <[email protected]> 
> wrote:
> 
> Mostly since I want to
> have at least one other consumer of the interface before I consider it
> as final, to make sure it covers the general use cases.


BTW, I was thinking about this, and I think you need to also handle the case 
where you try the ubc_uiomove_direct() case, but then *fall back* onto the 
non-direct case if some magic error is returned.  The idea here is that some 
CPUs will have to flush caches if the cache index of the direct-mapping of the 
page is incompatible with the cache index of any of the other mappings of the 
page (in the case of virtually-indexed caches).  These cache flushes could be 
potentially very expensive.

Either that, or have a global “opt-in to PMAP_DIRECT I/O” that affects all of 
the code paths you want to support, that can be called conditionally from 
machine-dependent code.

-- thorpej

Reply via email to