I've got a driver for a native Virtual Interface Architecture device,
which is this thing Intel has been flogging for a while. The API
allows user processes to register arbitrary virtual address ranges for
DMA; the driver then pins the pages and loads a map on the adapter
with virtual->user translations so that the user process can initiate
DMA using virtual addresses.
With a bit of work I think my driver might be bigmem-safe, as although
it walks the page table, it only translates to DMA-able bus addresses,
and never to kernel virtual memory addresses. The mmap() solution
doesn't work here, at least in a way that conforms with the API we're
trying to implement, because it doesn't allow the application to
register its own buffers. Physical contiguousness isn't an issue,
because the hardware can do per-page scatter/gather.
One approach to this issue is to just declare VI and things like it an
abomination against all well-designed I/O architectures, and forget
about it. However, it's quite possible that translating user virtual
addresses to bus addresses and locking the pages would be useful in
other cases, like zero-copy transport protocols and possibly in future
async I/O, although in those cases the mapping&locking would only last
for the duration of a single I/O operation.
......................................................................
Peter Desnoyers (978) 461-0402 x228
Giganet Inc. (978) 461-0430 (fax)
2352 Main St., Concord, MA 01742 mailto:pjd@giganet.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/