[RFC v2] mac80211: implement eBDP algorithm to fight bufferbloat

John W. Linville linville at tuxdriver.com
Mon Feb 21 14:15:10 EST 2011


On Mon, Feb 21, 2011 at 11:12:14AM -0500, Jim Gettys wrote:
> On 02/21/2011 10:28 AM, Johannes Berg wrote:

> >However, Nathaniel is right -- if the skb is freed right away during
> >tx() you kinda estimate its queue time to be virtually zero. That
> >doesn't make a lot of sense and might in certain conditions exacerbate
> >the problem, for example if the system is out of memory more packets
> >might be allowed through than in normal operation etc.

For those only reading the bloat lists, I replied elsewhere to clarify
that the present patch is only calculating max_enqueued for frames
that result in a tx status report (i.e. not for dropped frames) --
just in case that detail is somehow relevant...

> >Also, for some USB drivers I believe SKB lifetime has no relation to
> >queue size at all because the data is just shuffled into an URB. I'm not
> >sure we can solve this generically. I'm not really sure how this works
> >for USB drivers, I think they queue up frames with the HCI controller
> >rather than directly with the device.
> 
> Let me give a concrete example:
> 
> I checked with Javier Cardona about the Marvell module (libertas
> driver) used on OLPC a couple months ago.
> 
> It turns out there are 4 packets of buffering out in the wireless
> module itself (clearly needed for autonomous forwarding).
> 
> There is also one packet buffer in the device driver itself; Dave
> Woodhouse says it simplified the driver greatly.
> 
> I don't know if anyone has been thinking about how to manage the
> buffering from top to bottom, with devices that may do internal
> buffering in various places.

(FWIW, my current patch won't affect the libertas driver...)

The role I see my patch playing is to evaluate how good a job the
driver/device is doing with it's own buffers.  If it is keeping its
latency low, then I will allow it more fragments to buffer.  If its
latency grows too large, I throttle the number of fragments I allow
the driver to see.  To a large degree, it doesn't matter how much
buffering the driver/device is doing so long as it is moving the
frames along quickly.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.



More information about the Bloat-devel mailing list