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
|