From: David Rientjes <rientjes@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Oleg Nesterov <oleg@redhat.com>, Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org
Subject: Re: [patch v2 1/2] oom: avoid killing a task if a thread sharing its mm cannot be killed
Date: Wed, 18 Aug 2010 01:11:58 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1008180109450.7425@chino.kir.corp.google.com> (raw)
In-Reply-To: <20100818125501.90db0770.kamezawa.hiroyu@jp.fujitsu.com>
On Wed, 18 Aug 2010, KAMEZAWA Hiroyuki wrote:
> > Is it worth adding
> >
> > if (unlikely(current->signal->oom_score_adj == OOM_SCORE_ADJ_MIN))
> > atomic_dec(¤t->mm->oom_disable_count);
> >
> > to exit_mm() under task_lock() to avoid the O(n^2) select_bad_process() on
> > oom? Or do you think that's too expensive?
> >
>
> Hmm, if this coutner is changed only under down_write(mmap_sem),
> simple 'int' counter is enough quick.
>
task->mm->oom_disable_count would be protected by task_lock(task) to pin
the ->mm, which we already take in exit_mm() to set task->mm to NULL. We
can take task_lock() in the proc handler, oom killer, and exec() paths
where we're interested in the accounting.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2010-08-18 8:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 1:15 David Rientjes
2010-08-17 1:16 ` [patch v2 2/2] oom: kill all threads sharing oom killed task's mm David Rientjes
2010-08-18 2:08 ` KAMEZAWA Hiroyuki
2010-08-19 5:31 ` KOSAKI Motohiro
2010-08-19 8:03 ` David Rientjes
2010-08-19 8:10 ` KOSAKI Motohiro
2010-08-19 11:17 ` KOSAKI Motohiro
2010-08-19 20:48 ` David Rientjes
2010-08-20 0:31 ` KOSAKI Motohiro
2010-08-20 9:05 ` David Rientjes
2010-08-18 2:07 ` [patch v2 1/2] oom: avoid killing a task if a thread sharing its mm cannot be killed KAMEZAWA Hiroyuki
2010-08-18 2:36 ` David Rientjes
2010-08-18 3:11 ` KAMEZAWA Hiroyuki
2010-08-18 3:43 ` David Rientjes
2010-08-18 3:55 ` KAMEZAWA Hiroyuki
2010-08-18 8:11 ` David Rientjes [this message]
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=alpine.DEB.2.00.1008180109450.7425@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=riel@redhat.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