Re: Cached memory never gets released

From: Ross Biro
Date: Tue Jun 29 2004 - 20:26:16 EST


On Tue, 29 Jun 2004 09:18:26 -0700, David Ashley <dash@xxxxxxx> wrote:
>
>
> In the thread this is made clear somewhat, but when I post new
> emails I don't summarize all that is known about the problem.

Sorry, I missed that part of the thread.


It does sounds like you may have a real problem, so the next step I
would do is instrument kswapd to explain why it's not freeing cache
when it's under demand.

The first step is to add something to kernel/sysctrl.c to create a
variable to turn the debugging code on or off.

Then add a bunch of printk's to mm/vmscan.c explaining why every page
is not being freed, but only when the sysctrl variable is set.

Then get the machine into the bad state and turn on the printks.

Run your program that can't allocate memory

Turn off the printks and analyze the logs.

I'll be happy to help you figure out where to put printks and go over
the logs, but you have to make sure you are really getting an OOM kill
with that much cache for the output to be useful.
-
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/