netdev
[Top] [All Lists]

Re: Preallocated skb's?

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: Preallocated skb's?
From: jamal <hadi@xxxxxxxxxx>
Date: Thu, 14 Sep 2000 06:53:37 -0400 (EDT)
Cc: jgarzik@xxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <200009140836.BAA22073@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx

On Thu, 14 Sep 2000, David S. Miller wrote:

>    Date:      Thu, 14 Sep 2000 04:44:53 -0400
>    From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
> 
>    Does anyone think that allocating skbs during system idle time
>    would be useful?
> 
> I really don't like these sorts of things, because it makes an
> assumption as to what memory is about to be used for.
> 
> What if you were to preallocate skbs while idle, then the next thing
> which happens is some userland program walks over a 2gb dataset and
> no network activity happens at all.
> 

The FF code of the tulip does have skb recycling code.
And i belive Jes' acenic code does or did at some point. 
Robert Olson and I were thinking of taking out that code out of the
tulip for reasons such as you talk about (and the thought maybe that
the per-CPU slab might have obsoleted that requirement). We did some tests
with 2.4.0-test7 and were suprised to observe that at high rate of input
packets, it still made as a big a difference as 7000 packets per second
;-> i.e we got 7Kpps more by using skb recycling.

Dave, would a scheme with an aging of the skbs in the recycle queue
and an upper bound of the number of packets sitting on the queue be
acceptable?
Maybe ANK can make a comment as well.
Robert and I plan to play with such a scheme for a long time under many 
different scenarios and come with numbers (throughput etc) instead of
"here's a patch and intuitively it makes sense". 
This is really a 2.5 thing if acceptable.

cheers,
jamal

PS:- OLS patch coming soon; a few more tests (as time permits);-> 


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