From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm, oom: remove sleep from under oom_lock
Date: Tue, 10 Jul 2018 11:55:21 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1807101152410.9234@chino.kir.corp.google.com> (raw)
In-Reply-To: <20180710094341.GD14284@dhcp22.suse.cz>
On Tue, 10 Jul 2018, Michal Hocko wrote:
> What do you think about the following?
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index ed9d473c571e..32e6f7becb40 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -53,6 +53,14 @@ int sysctl_panic_on_oom;
> int sysctl_oom_kill_allocating_task;
> int sysctl_oom_dump_tasks = 1;
>
> +/*
> + * Serializes oom killer invocations (out_of_memory()) from all contexts to
> + * prevent from over eager oom killing (e.g. when the oom killer is invoked
> + * from different domains).
> + *
> + * oom_killer_disable() relies on this lock to stabilize oom_killer_disabled
> + * and mark_oom_victim
> + */
> DEFINE_MUTEX(oom_lock);
>
> #ifdef CONFIG_NUMA
I think it's better, thanks. However, does it address the question about
why __oom_reap_task_mm() needs oom_lock protection? Perhaps it would be
helpful to mention synchronization between reaping triggered from
oom_reaper and by exit_mmap().
next prev parent reply other threads:[~2018-07-10 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 7:47 [PATCH] mm, oom: remove sleep from under oom_lock Michal Hocko
2018-07-09 22:49 ` David Rientjes
2018-07-10 9:43 ` Michal Hocko
2018-07-10 18:55 ` David Rientjes [this message]
2018-07-10 21:12 ` David Rientjes
2018-07-11 8:59 ` Michal Hocko
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.21.1807101152410.9234@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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;
as well as URLs for NNTP newsgroup(s).