From: Michal Hocko <mhocko@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jakob Unterwurzacher <jakobunt@gmail.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] oom: Do not panic when OOM killer is sysrq triggered
Date: Thu, 9 Jul 2015 10:23:04 +0200 [thread overview]
Message-ID: <20150709082304.GA13872@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.10.1507081635030.16585@chino.kir.corp.google.com>
On Wed 08-07-15 16:36:14, David Rientjes wrote:
> On Wed, 8 Jul 2015, Michal Hocko wrote:
>
> > From: Michal Hocko <mhocko@suse.cz>
> >
> > OOM killer might be triggered explicitly via sysrq+f. This is supposed
> > to kill a task no matter what e.g. a task is selected even though there
> > is an OOM victim on the way to exit. This is a big hammer for an admin
> > to help to resolve a memory short condition when the system is not able
> > to cope with it on its own in a reasonable time frame (e.g. when the
> > system is trashing or the OOM killer cannot make sufficient progress)
> >
> > E.g. it doesn't make any sense to obey panic_on_oom setting because
> > a) administrator could have used other sysrqs to achieve the
> > panic/reboot and b) the policy would break an existing usecase to
> > kill a memory hog which would be recoverable unlike the panic which
> > might be configured for the real OOM condition.
> >
> > It also doesn't make much sense to panic the system when there is no
> > OOM killable task because administrator might choose to do additional
> > steps before rebooting/panicking the system.
> >
> > While we are there also add a comment explaining why
> > sysctl_oom_kill_allocating_task doesn't apply to sysrq triggered OOM
> > killer even though there is no explicit check and we subtly rely
> > on current->mm being NULL for the context from which it is triggered.
> >
> > Also be more explicit about sysrq+f behavior in the documentation.
> >
> > Signed-off-by: Michal Hocko <mhocko@suse.cz>
>
> Nack, this is already handled by patch 2 in my series. I understand that
I guess you mean patch#3
> the titles were wrong for patches 2 and 3, but it doesn't mean we need to
> add hacks around the code before organizing this into struct oom_control
It is much easier to backport _fixes_ into older kernels (and yes I do
care about that) if they do not depend on other cleanups. So I do not
understand your point here. Besides that the cleanup really didn't make
much change to the actuall fix because one way or another you still have
to add a simple condition to rule out a heuristic/configuration which
doesn't apply to sysrq+f path.
So I am really lost in your argumentation here.
> or completely pointless comments and printks that will fill the kernel
> log.
Could you explain what is so pointless about a comment which clarifies
the fact which is not obviously visible from the current function?
Also could you explain why the admin shouldn't get an information if
sysrq+f didn't kill anything because no eligible task has been found?
--
Michal Hocko
SUSE Labs
--
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>
next prev parent reply other threads:[~2015-07-09 8:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 13:04 [PATCH 0/4] oom: sysrq+f fixes + cleanups Michal Hocko
2015-07-08 13:04 ` [PATCH 1/4] oom: Do not panic when OOM killer is sysrq triggered Michal Hocko
2015-07-08 23:36 ` David Rientjes
2015-07-09 8:23 ` Michal Hocko [this message]
2015-07-09 21:03 ` David Rientjes
2015-07-10 7:41 ` Michal Hocko
2015-07-08 13:04 ` [PATCH 2/4] oom: Do not invoke oom notifiers on sysrq+f Michal Hocko
2015-07-08 23:37 ` David Rientjes
2015-07-09 8:55 ` Michal Hocko
2015-07-09 21:07 ` David Rientjes
2015-07-10 7:40 ` Michal Hocko
2015-07-14 21:58 ` David Rientjes
2015-07-15 9:42 ` Michal Hocko
2015-07-15 22:21 ` David Rientjes
2015-07-15 22:44 ` [patch -mm] mm, oom: move oom notifiers to page allocator David Rientjes
2015-07-16 7:12 ` Michal Hocko
2015-07-08 13:04 ` [PATCH 3/4] mm, oom: organize oom context into struct Michal Hocko
2015-07-08 23:38 ` David Rientjes
2015-07-09 8:56 ` Michal Hocko
2015-07-09 21:09 ` David Rientjes
2015-07-08 13:04 ` [PATCH 4/4] oom: split out forced OOM killer Michal Hocko
2015-07-08 23:41 ` David Rientjes
2015-07-09 10:05 ` Michal Hocko
2015-07-09 21:27 ` David Rientjes
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=20150709082304.GA13872@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=jakobunt@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.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