Re: Cached memory never gets released

From: Ross Biro
Date: Thu Jun 24 2004 - 10:54:19 EST


On Thu, 24 Jun 2004 07:48:20 -0700, David Ashley <dash@xxxxxxx> wrote:

> So we're snowballing but I don't know what mechanism is supposed to actually
> free the cached pages when the system is low on memory. Any advice would
> be welcome.
>

You may want to examine /proc/meminfo, /proc/slabinfo, and the output
of sysrq-m.

mm/vmscan.c (kswapd) is responsible for freeing most memory. The
routine you are probably most interested in is shrink_cache.

I would check to make sure that the pages in the icache are backed by
a mapping and if so, that they are clean. If either of those two
conditions are not met, then the page cannot be thrown away.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/