netdev
[Top] [All Lists]

Re: New net features for added performance

To: Pavel Machek <pavel@xxxxxxx>
Subject: Re: New net features for added performance
From: Andi Kleen <ak@xxxxxx>
Date: Thu, 1 Mar 2001 21:41:07 +0100
Cc: Andi Kleen <ak@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <no.id>; from Pavel Machek on Thu, Mar 01, 2001 at 09:32:15PM +0100
References: <3A9842DC.B42ECD7A@mandrakesoft.com> <oupsnl3k5gs.fsf@pigdrop.muc.suse.de> <3A984BDA.190B4D8E@mandrakesoft.com> <20010225011211.A23853@gruyere.muc.suse.de>
Sender: owner-netdev@xxxxxxxxxxx
On Thu, Mar 01, 2001 at 09:32:15PM +0100, Pavel Machek wrote:
> Hi!
> 
> > > an alloc of a PKT_BUF_SZ'd skb immediately follows a free of a
> > > same-sized skb.  100% of the time.
> > 
> > Free/Alloc gives the mm the chance to throttle it by failing, and also to 
> > recover from fragmentation by packing the slabs. If you don't do it you need
> > to add a hook somewhere that gets triggered on low memory situations and 
> > frees the buffers.
> 
> And what? It makes allocation longer lived. Our MM should survive that just
> fine.

It's better for the MM if you relocate regularly. This way it can recover
from fragmentation. A zone allocator like slab can only help against 
fragmentation when all the objects have roughtly similar livetimes.
Private object caches prevent that. In addition it also needs additional
mechanisms to drain them on memory shortage -- if you regularly return
to slab it will do it for you.




-Andi


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