On Mon, Apr 12, 2010 at 09:31:12AM -0600, Sverre Froyen wrote: > On Sun April 11 2010 12:40:45 David Young wrote: > > On Sat, Apr 10, 2010 at 12:49:48PM +1000, matthew green wrote: > > > would you try this variant? it handles the case where MEXTMALLOC() > > > would fail to allocate external storage, and seems to work on my > > > iwn(4). i'll commit this if you confirm it works. > > > > Is there any reason not to replace the implementation of > > iwn_alloc_rbuf() with MEXTMALLOC(), instead? > > I was told there might be a performance hit. My tests with 11g on amd64 are > inconclusive. BTW, it is easy to change the current driver to test this. > > I wonder if it would be worth (or even possible) to use pool_cache with the > bus_dmamap allocator. It is pretty simple to add a 4KiB pool to > kern/uipc_mbuf.c.
I think this is a very good idea -- though it might be worthwhile to try to extend it to provide other drivers with a way to get jumbo rx buffers, there are a lot of private implementations of that (and, then again, there are drivers like wm which manage to do jumbo receive without it -- it's not clear to me that all the hardware that can chain smaller buffers as wm does actually is used that way by its drivers). It should be pretty easy to implement/test, no? And you can use limits on the pool size to control fairness and exhaustion issues. Thor