From: Jesse Barnes <jbarnes@sgi.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Andrew Morton <akpm@osdl.org>,
Nick Piggin <piggin@cyberone.com.au>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] Remove OOM killer from try_to_free_pages / all_unreclaimable braindamage
Date: Fri, 5 Nov 2004 15:32:50 -0800 [thread overview]
Message-ID: <200411051532.51150.jbarnes@sgi.com> (raw)
In-Reply-To: <20041105200118.GA20321@logos.cnet>
[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]
On Friday, November 05, 2004 12:01 pm, Marcelo Tosatti wrote:
> Hi,
>
> As you know the OOM is very problematic in 2.6 right now - so I went
> to investigate it.
>
> Currently the oom killer is invoked from the task reclaim
> code (try_to_free_pages), which IMO is fundamentally broken,
> because its non deterministic - the chance the OOM killer
> will be triggered increases as the number of tasks inside
> reclaiming increases. And kswapd is freeing pages in parallel,
> which is completly ignored by this approach.
>
> In my opinion the correct approach is to trigger the OOM killer
> when kswapd is unable to free pages. Once that is done, the number
> of tasks inside page reclaim is irrelevant.
That makes sense.
> With this in place I can't see spurious OOM kills - just need to guarantee
> that it reliably OOM kills when we are really out of memory.
That's good. I can test it on a large machine (hopefully next week).
> Comments?
Sounds good, though we may want to do a couple of more things, we shouldn't
kill root tasks quite as easily and we should avoid zombies since they may be
large apps in the process of exiting, and killing them would be bad (iirc
it'll cause a panic).
Thanks,
Jesse
[-- Attachment #2: oom-fixes.patch --]
[-- Type: text/x-diff, Size: 623 bytes --]
===== mm/oom_kill.c 1.30 vs edited =====
--- 1.30/mm/oom_kill.c 2004-10-13 21:08:29 -07:00
+++ edited/mm/oom_kill.c 2004-11-05 15:32:36 -08:00
@@ -88,7 +88,7 @@
*/
if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_ADMIN) ||
p->uid == 0 || p->euid == 0)
- points /= 4;
+ points /= 10;
/*
* We don't want to kill a process with direct hardware access.
@@ -120,7 +120,7 @@
do_posix_clock_monotonic_gettime(&uptime);
do_each_thread(g, p)
- if (p->pid) {
+ if (p->pid && !(p->state & TASK_ZOMBIE)) {
unsigned long points = badness(p, uptime.tv_sec);
if (points > maxpoints) {
chosen = p;
next prev parent reply other threads:[~2004-11-05 23:32 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-05 20:01 Marcelo Tosatti
2004-11-05 23:32 ` Jesse Barnes [this message]
2004-11-05 23:47 ` Thomas Gleixner
2004-11-06 1:20 ` Andrea Arcangeli
2004-11-06 1:26 ` Nick Piggin
2004-11-06 1:36 ` Jesse Barnes
2004-11-06 1:50 ` Andrea Arcangeli
2004-11-06 9:47 ` Hugh Dickins
2004-11-06 10:53 ` Nick Piggin
2004-11-06 15:29 ` Andrea Arcangeli
2004-11-06 15:29 ` Andrea Arcangeli
2004-11-06 16:21 ` Hugh Dickins
2004-12-10 6:02 ` William Lee Irwin III
2004-11-06 11:37 ` Nikita Danilov
2004-11-06 15:32 ` Andrea Arcangeli
2004-11-06 16:54 ` Nikita Danilov
2004-11-06 17:44 ` Andrea Arcangeli
2004-11-06 19:24 ` Nikita Danilov
2004-11-07 1:16 ` Andrea Arcangeli
2004-11-06 10:11 ` Marcelo Tosatti
2004-11-06 1:55 ` Thomas Gleixner
2004-11-06 10:28 ` Marcelo Tosatti
2004-11-17 22:54 ` Werner Almesberger
2004-11-17 23:27 ` Chris Ross
2004-11-18 0:04 ` Werner Almesberger
2004-11-18 0:28 ` Chris Ross
2004-11-18 1:14 ` Werner Almesberger
2004-11-18 8:20 ` Chris Ross
2004-11-18 10:01 ` Werner Almesberger
2004-11-18 14:44 ` Thomas Gleixner
2004-11-18 15:10 ` Chris Friesen
2004-11-06 10:05 ` Marcelo Tosatti
2004-11-06 15:44 ` Andrea Arcangeli
2004-11-06 15:52 ` Arjan van de Ven
2004-11-06 17:09 ` Marcelo Tosatti
2004-11-07 0:48 ` Andrea Arcangeli
2004-11-07 11:21 ` Marcelo Tosatti
2004-11-06 12:53 ` [PATCH] Remove OOM killer Andries Brouwer
2004-11-06 10:41 ` Marcelo Tosatti
2004-11-07 9:26 ` Marko Macek
2004-11-08 16:27 ` [PATCH] Remove OOM killer from try_to_free_pages / all_unreclaimable braindamage Marcelo Tosatti
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=200411051532.51150.jbarnes@sgi.com \
--to=jbarnes@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=piggin@cyberone.com.au \
/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