From: Andrea Arcangeli <andrea@suse.de>
To: Andrew Morton <akpm@zip.com.au>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.16 & OOM killer screw up (fwd)
Date: Tue, 11 Dec 2001 01:11:58 +0100 [thread overview]
Message-ID: <20011211011158.A4801@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.21.0112101705281.25362-100000@freak.distro.conectiva> <3C151F7B.44125B1@zip.com.au>
In-Reply-To: <3C151F7B.44125B1@zip.com.au>; from akpm@zip.com.au on Mon, Dec 10, 2001 at 12:47:55PM -0800
On Mon, Dec 10, 2001 at 12:47:55PM -0800, Andrew Morton wrote:
> Marcelo Tosatti wrote:
> >
> > Andrea,
> >
> > Could you please start looking at any 2.4 VM issues which show up ?
> >
>
> Just fwiw, I did some testing on this yesterday.
>
> Buffers and cache data are sitting on the active list, and shrink_caches()
> is *not* getting them off the active list, and onto the inactive list
> where they can be freed.
please check 2.4.17pre4aa1, see the per-classzone info, they will
prevent all the problems with the refill inactive with highmem.
>
> So we end up with enormous amounts of anon memory on the inactive
> list, so this code:
>
> /* try to keep the active list 2/3 of the size of the cache */
> ratio = (unsigned long) nr_pages * nr_active_pages / ((nr_inactive_pages + 1) * 2);
> refill_inactive(ratio);
>
> just calls refill_inactive(0) all the time. Nothing gets moved
> onto the inactive list - it remains full of unfreeable anon
> allocations. And with no swap, there's nowhere to go.
>
> I think a little fix is to add
>
> if (ratio < nr_pages)
> ratio = nr_pages;
>
> so we at least move *something* onto the inactive list.
>
> Also refill_inactive needs to be changed so that it counts
> the number of pages which it actually moved, rather than
> the number of pages which it inspected.
done ages ago here.
>
> In my swapless testing, I burnt HUGE amounts of CPU in flush_tlb_others().
> So we're madly trying to swap pages out and finding that there's no swap
> space. I beleive that when we find there's no swap left we should move
> the page onto the active list so we don't keep rescanning it pointlessly.
yes, however I think the swap-flood with no swap isn't a very
interesting case to optimize.
>
> A fix may be to just remove the use-once stuff. It is one of the
> sources of this problem, because it's overpopulating the inactive list.
>
> In my testing last night, I tried to allocate 650 megs on a 768 meg
> swapless box. Got oom-killed when there was almost 100 megs of freeable
> memory: half buffercache, half filecache. Presumably, all of it was
> stuck on the active list with no way to get off.
>
> We also need to do something about shrink_[di]cache_memory(),
> which seem to be called in the wrong place.
>
> There's also the report concerning modify_ldt() failure in a
> similar situation. I'm not sure why this one occurred. It
> vmallocs 64k of memory and that seems to fail.
dunno about this modify_ldt failure.
>
> I did some similar testing a week or so ago, also tested
> the -aa patches. They seemed to maybe help a tiny bit,
> but not significantly.
I don't have any pending bug report. AFIK those bugs are only in
mainline. If you can reproduce with -aa please send me a bug report.
thanks,
Andrea
next prev parent reply other threads:[~2001-12-11 0:11 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-10 19:08 2.4.16 & OOM killer screw up (fwd) Marcelo Tosatti
2001-12-10 20:47 ` Andrew Morton
2001-12-10 19:42 ` Marcelo Tosatti
2001-12-11 0:11 ` Andrea Arcangeli [this message]
2001-12-11 7:07 ` Andrew Morton
2001-12-11 13:32 ` Rik van Riel
2001-12-11 13:46 ` Andrea Arcangeli
2001-12-12 8:44 ` Andrew Morton
2001-12-12 9:21 ` Andrea Arcangeli
2001-12-12 9:45 ` Rik van Riel
2001-12-12 10:09 ` Andrea Arcangeli
2001-12-12 9:59 ` Andrew Morton
2001-12-12 10:15 ` Andrea Arcangeli
2001-12-11 13:42 ` Andrea Arcangeli
2001-12-11 13:59 ` Rik van Riel
2001-12-11 14:23 ` Andrea Arcangeli
2001-12-11 15:27 ` Daniel Phillips
2001-12-12 11:16 ` Andrea Arcangeli
2001-12-12 20:03 ` Daniel Phillips
2001-12-12 21:25 ` Andrea Arcangeli
2001-12-11 13:59 ` Abraham vd Merwe
2001-12-11 14:01 ` Andrea Arcangeli
2001-12-11 17:30 ` Leigh Orf
2001-12-11 15:47 ` Henning P. Schmiedehausen
2001-12-11 16:01 ` Alan Cox
2001-12-11 16:37 ` Hubert Mantel
2001-12-11 17:09 ` Rik van Riel
2001-12-11 17:28 ` Alan Cox
2001-12-11 17:22 ` Rik van Riel
2001-12-11 17:23 ` Christoph Hellwig
2001-12-12 22:20 ` Rob Landley
2001-12-13 8:48 ` Alan Cox
2001-12-13 8:47 ` David S. Miller
2001-12-13 18:41 ` Matthias Andree
2001-12-13 10:22 ` [OT] " Rob Landley
2001-12-12 8:39 ` Andrew Morton
2001-12-11 0:43 ` Andrea Arcangeli
2001-12-11 15:46 ` Luigi Genoni
2001-12-12 22:05 ` Ken Brownfield
2001-12-12 22:30 ` Andrea Arcangeli
2001-12-12 23:23 ` Rik van Riel
[not found] <Pine.LNX.4.33L.0112102004490.1352-100000@duckman.distro.conectiva>
2001-12-11 16:45 ` Marcelo Tosatti
2001-12-11 18:51 ` Rik van Riel
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=20011211011158.A4801@athlon.random \
--to=andrea@suse.de \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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