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
|