Re: Limiting memory allocated by buffer cache in 2.4 kernel

From: Marcelo Tosatti
Date: Thu Dec 16 2004 - 07:04:04 EST

On Wed, Dec 15, 2004 at 09:56:23AM -0800, Jesse Barnes wrote:
> On Wednesday, December 15, 2004 6:45 am, N.C.Krishna Murthy (krmurthy) wrote:
> > Hi,
> > I am using linux 2.4.22 kernel. Is there any way to limit the amount
> > of memory allocated by buffer cache? Eariler versions used to have
> > /proc/sys/vm/buffermem.

Nope, there is no such feature.

It may have worked in v2.2 (not sure about that though, have you checked?) but
it surely doesnt in v2.4.

> For that matter, is there a way to do this in 2.6? We've seen problems caused
> by huge page caches pushing data allocations off-node, so it would be really
> nice to have a limit control...

v2.6 doesnt have such feature either.

Shouldnt be too hard to add hooks at page_cache_alloc()/page_cache_alloc_cold()
level for dropping clean unmapped pages off the tail of the LRU once a given
limit is reached. Andrew ?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at