bus_dmamap_sync() for bounced client buffers from user address space

Konstantin Belousov kostikbel at gmail.com
Tue Apr 28 15:42:50 UTC 2015


On Tue, Apr 28, 2015 at 09:49:06AM -0500, Jason Harmening wrote:
> 
> Either _bus_dmamap_load_ma or out-of-context UIO_USERSPACE bounce
> buffering could have issues with waiting on sfbufs on some arches,
> including arm.  That could be fixed by making each unmapped bounce
> buffer set up a kva mapping for the data addr when it's created, but
> that fix might be worse than the problem it's trying to solve.

I had an implementation of the sfbuf allocator which never sleeps. If
sfbuf was not available without sleep, a callback is called later, when
a reusable sf buf is freed. It was written to allow drivers like PIO
ATA to take unmapped bios, but I never finished it, at least did not
converted a single driver.

I am not sure if I can find the branch or is it reasonable to try to
rebase it, but the base idea may be useful for the UIO_USERSPACE case
as well.


More information about the freebsd-arch mailing list