tech-kern archive

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

Re: rbuf starvation in the iwn driver



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.

> Previously, a remote host could exhaust an iwn(4)'s private Rx buffer
> pool by, say, sending a ton of tiny segments to TCP sockets that already
> have a long backlog.  Can a remote host now deplete the malloc(9) pool
> in the same way?

That is certainly possible but no different than what is done in other drivers, 
e.g. wpi. Look at OpenBSD's MCETGETI for a solution to this problem.

Regards,
Sverre


Home | Main Index | Thread Index | Old Index