Andrew Gallatin wrote:

How about what I've suggested in the past?  Let's copy the one
networking thing that MacOSX got right (at least before Adi started
at Apple :) and keep network buffers pre-mapped in the IOMMU at a
system level.

This means we invent a new mblk data allocator which allocates buffers
which are "optimized" for network drivers.  On IOMMU-less systems,
these buffers have their physical address associated with them
(somehow).  On IOMMU-full systems, these buffers are a static pool
which is pre-allocated at boot time, and pre-mapped in the IOMMU.
Rather than their physical addresses, they have their IOMMU address
associated with them.  Drivers continue to use the existing DDI DMA
interface, but it just gets much, much faster because 90% of the code
path goes away for data blocks allocated by this fastpath.  There are
a few cases where this can break down (multiple IOMMUs per system,
IOMMU exhaustion), and then things would only devolve to what we have
now.

Drew

I want new interfaces in the GLDv3 as well. Right now there are some complexities that come about because of the loan up BS. And drivers have to be clever to decide whether to bcopy or to direct DMA. All that logic belongs in platform common code, not in the driver.

A clean set of interfaces would be something like:

ddi_get_mblk_cookies(ddi_dma_cookie_t *, int *numcookies);

Used on the TX path, and for RX path:

ddi_allocb_with_dma_attributes() (or "with dma handle" or somesuch).

There are some details missing like ddi_dma_sync() (and what do you do for a handle?)

   -- Garret

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to