From: Andrew Morton <akpm@zip.com.au>
To: Dave Jones <davej@suse.de>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Over-enthusiastic OOM killer.
Date: Thu, 13 Dec 2001 11:19:04 -0800 [thread overview]
Message-ID: <3C18FF28.A531BDC4@zip.com.au> (raw)
In-Reply-To: <200112130734.fBD7YXU01306@penguin.transmeta.com> <Pine.LNX.4.33.0112131407250.28164-100000@Appserv.suse.de>
Dave Jones wrote:
>
> On Wed, 12 Dec 2001, Linus Torvalds wrote:
>
> > >The oom killer just killed a bunch of processes on my workstation.
> > >What I don't understand, is why this was deemed necessary, when
> > >there was 400MB of buffer cache sitting around in memory, and 175MB
> > >of free swap space unused. (66mb of swap was used)
> >
> > Ehh.. I bet you didn't have free swap.
>
> Difficult to say after the killing, but even if that were the case,
> why wasn't buffer cache pruned before the more drastic action ?
>
> After the killing, there was 400MB of real memory, doing absolutely
> nothing but holding cached data.
>
It's a well-known (?) bug in 2.4.17-pre VM. Anon allocations are
going onto the inactive list, so the inactive list is hugely larger
than the active list. So this expression in shrink_caches:
ratio = (unsigned long) nr_pages * nr_active_pages / ((nr_inactive_pages + 1) * 2);
Evaluates to sero all the time, so we never move any of the buffercache
pages onto the inactive list from where they can be freed.
It can be fixed with
if (ratio == 0)
ratio = nr_pages;
It can be fixed by putting anon pages onto the active list in
do_anonymous_page.
It can probably be fixed with Rik's remove-use-once patch. I
haven't tested that.
It is fixed in the latest -aa patch.
The remaining minor detail is that it isn't fixed in Linux :(
-
next prev parent reply other threads:[~2001-12-13 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200112130734.fBD7YXU01306@penguin.transmeta.com>
2001-12-13 13:10 ` Over-enthusiastic OOM killer Dave Jones
2001-12-13 19:19 ` Andrew Morton [this message]
2001-12-13 0:24 Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C18FF28.A531BDC4@zip.com.au \
--to=akpm@zip.com.au \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox