tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pool_cache interface and memory constraints



Hi,

I've been taking another look at the memory handling in the iwn driver with 
the goal of eliminating the rbuf local storage.

Adding a 4 KiB pool cache and using this storage instead of the rbuf storage 
works, but results in dma transfers using bounce buffers (on amd64) because of 
pool cache memory allocated above the 4 GiB boundary. I notice that some (and 
perhaps several) drivers are using the MCLGET macro to obtain storage that is 
passed to bus_dmamap_load_mbuf so this looks like a wider issue with the 
pool_cache operation. Perhaps the default allocator should use address space 
below 4 GiB?  As an alternative it seems I could create alternative pool 
caches using bus_dmamem_alloc as a custom allocator.

Ideally, we would need separate pool caches for PCI, ISA, etc., each with its 
own set of constraints. These constraints are part of the DMA tag structures. 
It would therefore be nice to be able to access the pool cache by the DMA tag 
and the size rather than a pool cache name string. Should pool cache (and 
pool) be extended to support this?

Comments?

Thanks,
Sverre


Home | Main Index | Thread Index | Old Index