linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jakob Unterwurzacher <jakobunt@gmail.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.cz>
Subject: Re: [PATCH 4/4] oom: split out forced OOM killer
Date: Wed, 8 Jul 2015 16:41:23 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1507081638290.16585@chino.kir.corp.google.com> (raw)
In-Reply-To: <1436360661-31928-5-git-send-email-mhocko@suse.com>

On Wed, 8 Jul 2015, Michal Hocko wrote:

> From: Michal Hocko <mhocko@suse.cz>
> 
> The forced OOM killing is currently wired into out_of_memory() call
> even though their objective is different which makes the code ugly
> and harder to follow. Generic out_of_memory path has to deal with
> configuration settings and heuristics which are completely irrelevant
> to the forced OOM killer (e.g. sysctl_oom_kill_allocating_task or
> OOM killer prevention for already dying tasks). All of them are
> either relying on explicit force_kill check or indirectly by checking
> current->mm which is always NULL for sysrq+f. This is not nice, hard
> to follow and error prone.
> 
> Let's pull forced OOM killer code out into a separate function
> (force_out_of_memory) which is really trivial now.
> As a bonus we can clearly state that this is a forced OOM killer
> in the OOM message which is helpful to distinguish it from the
> regular OOM killer.
> 
> Signed-off-by: Michal Hocko <mhocko@suse.cz>

It's really absurd that we have to go through this over and over and that 
your patches are actually being merged into -mm just because you don't get 
the point.

We have no need for a force_out_of_memory() function.  None whatsoever.  
Keeping oc->force_kill around is just more pointless space on a very deep 
stack and I'm tired of fixing stack overflows.  I'm certainly not going to 
introduce others because you think it looks cleaner in the code when 
memory compaction does the exact same thing by using cc->order == -1 to 
mean explicit compaction.

This is turning into a complete waste of time.

--
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>

  reply	other threads:[~2015-07-08 23:41 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
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 [this message]
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=alpine.DEB.2.10.1507081638290.16585@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=jakobunt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mhocko@suse.cz \
    /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