Re: [patch] vmfixes-2.4.0-test9-B2

From: Andrea Arcangeli (andrea@suse.de)
Date: Sun Sep 24 2000 - 20:45:51 EST


On Sun, Sep 24, 2000 at 09:53:33PM -0300, Marcelo Tosatti wrote:
> Btw, why we need kmem_cache_shrink() inside shrink_{i,d}cache_memory ?

Because kmem_cache_free doesn't free anything. It only queues slab
objects into the partial and free part of the cachep slab queue (so that
they're ready to be freed later, and that's what we do in shrink_slab_cache).

> calls shrink_{i,d}cache_memory) already shrink the SLAB cache (with
> kmem_cache_reap), I dont think its needed.

kmem_cache_reap shrinks the slabs at _very_ low frequency. It's worthless to
keep lots of dentries and icache into the slab internal queues until
kmem_cache_reap kicks in again, if we free them such memory immediatly instead
we'll run kmem_cache_reap later and for something more appropraite for what's
been designed. The [id]cache shrink could release lots of memory.

Andrea
-
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 : Sat Sep 30 2000 - 21:00:13 EST