netdev
[Top] [All Lists]

Re: [patch 01/13] b44: allocate tx bounce bufs as needed

To: akpm@xxxxxxxx
Subject: Re: [patch 01/13] b44: allocate tx bounce bufs as needed
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 15 Mar 2005 16:51:49 -0800
Cc: jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, akpm@xxxxxxxx, linville@xxxxxxxxxxxxx, pp@xxxxxxxxx
In-reply-to: <200503152222.j2FMMW2x016793@xxxxxxxxxxxxxxxxxxx>
References: <200503152222.j2FMMW2x016793@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 15 Mar 2005 14:22:37 -0800
akpm@xxxxxxxx wrote:

> From: "John W. Linville" <linville@xxxxxxxxxxxxx>
> 
> The b44 hardware has a DMA mask that only covers 1GB.  On x86, a DMA mask
> <4GB results in allocations using GFP_DMA.  The GFP_DMA pool (16MB) gets
> exhausted very quickly in some configurations.
> 
> The b44 driver has been pre-allocating bounce buffers in a single large
> (~750k) contiguous block.  On boxes w/ limited GFP_DMA memory, this
> allocation can fail.  Such failure results in the driver being unable to
> load and function.
> 
> The solution here is to check each tx skb against the DMA mask.  If it is
> outside the allowable range, a single buffer is allocated from the GFP_DMA
> range and discarded after the tx completes.  This behaviour mimics what is
> done for bounce buffers on the rx side.

I think this one is fine and I was expecting Jeff to pick it up
and push upstream.

<Prev in Thread] Current Thread [Next in Thread>