Re: Preallocated skb's?

From: Andi Kleen (ak@suse.de)
Date: Thu Sep 14 2000 - 07:15:27 EST


On Thu, Sep 14, 2000 at 04:55:16AM -0700, David S. Miller wrote:
> Date: Thu, 14 Sep 2000 06:53:37 -0400 (EDT)
> From: jamal <hadi@cyberus.ca>
>
> 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?
>
> This sounds more reasonable, certainly. Perhaps you and Jeff should
> collaborate :-)

Instead of explicit aging you could just use the skb_head slab cache for that:
just kmalloc/kfree the data area in the slab constructor/destructor. This
could probably give you most of the advantages of recycled skbs (less
header setups) etc. in the slab environment. You may need to tune the
slab cache prunning algorithms for that a bit though because the weight
of a skbhead would be much more heavy (e.g. by giving the skbhead slab cache a
bigger priority for prunning)

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:23 EST