[email protected] (Jason Thorpe) writes:
>> You need a really huge amount of RAM for that, and also a huge
>> KVA space.
>...but it doesn't have to be that way.
>The fundamental problem is that for physio, we currently have to map the
>buffer into kernel space at all.
Mapping into KVA is another problem.
> We really should have a more abstract way to describe memory that is passed
> down to device drivers that currently take struct buf *s, call it an I/O
> memory descriptor ("iomd"). This iomd would have, say, an array of vm_page
> *'s, or perhaps an array of paddr_t's, but would also have a pointer to the
> buffer as mapped into kernel address space.
The problem is that currently we and also some hardware cannot handle
such a construct.
>Then a new bus_dmamap_load_iomd() call could take an iomd as an argument, and
>skip doing a bunch of work (calling into the pmap later to get the physical
>address), and just build the bus_dma_segment_t's directly.
There is hardware that can only handle a single bus_dma_segment.
So that's:
- support some more abstract MAXPHYS (i.e. not a global constant).
- make buffers based on scatter-gather lists instead of a single linear
piece of memory.
- make drivers use these scatter-gather buffers
- try to emulate this behaviour when hardware is too limited.
- make other users of buffers compatible with scatter-gather lists
That's a long way to go and still not related to mapping buffers into KVA.
--
--
Michael van Elst
Internet: [email protected]
"A potential Snark may lurk in every tree."