tech-net archive

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

Re: rbuf starvation in the iwn driver



On Wed April 7 2010 15:54:49 Thor Lancelot Simon wrote:
> On Wed, Apr 07, 2010 at 03:47:07PM -0600, Sverre Froyen wrote:
> > #define MEXTMALLOC(m, size, how)
> > do {
> >         (m)->m_ext_storage.ext_buf =
> >             (void *)malloc((size), mbtypes[(m)->m_type], (how));
> > ...
> >
> > with a single malloc looks like it would be contiguous but probably slow.
> > It should also be properly aligned according to the malloc(9) man page.
> 
> Doesn't this memory need to be dma-safe?

It does. I assume it needs to be contiguous and properly aligned, which 
malloc(9) seems to imply. Does it also need to be wired? I notice that the 
malloc man page says it's deprecated and to use pool_cache(9) or kmem(9) 
instead. kmem provides wired memory.

A quick test of using MEXTMALLOC in the driver appears to work just fine. In 
fact, the throughput appears to improved and the hard lockups are gone (at 
least in my initial tests).

Regards,
Sverre


Home | Main Index | Thread Index | Old Index