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

Andrea Arcangeli
2000-09-25T01:45:51Z

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