Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1180304

Re: [PATCH 4/4] oom: split out forced OOM killer

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From David Rientjes <rientjes@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] oom: split out forced OOM killer
Date Thu, 09 Jul 2015 01:50:01 +0200
Message-ID <pK7gd-183-1@gated-at.bofh.it> (permalink)
References <pJXgR-38d-11@gated-at.bofh.it> <pJXgS-38d-19@gated-at.bofh.it>
X-Original-To Michal Hocko <mhocko@suse.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=vLhfDWZQV5GFDft4pvKivpqcZwJziIRXcX41VBnyx+4=; b=pwwV1+vHyXxkIbsgsBpIumhOVjpzGLxO7lNp3NtwFwQz4tGZxikGUk1W93UWiS/Jzu //v0bIGqAdblSrDz3eTRWZ9IQ4d5bZyaSGqI1lmj2ILQnUtAl/6nlCqYuXZmE61olTor 64peTOK7/l9QhXSJK0aaVf9nkinSUCBwR+rVDquNfuWuDMfyuohZHtRO6TUANqpJ1om9 ZolHkGXEUl+WRqh/onaEOon3LwsuwSd5lV0uYH+TZLeQriVKO3zcApgFLWfjYdr/Kd2n LVSzNoM8zLKdlz3sJXo9SQ4Cw/nAdoHEASgiDzFyfeyn3oa1j0BZUE5WBEkU1gKjQtez Mntw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=vLhfDWZQV5GFDft4pvKivpqcZwJziIRXcX41VBnyx+4=; b=KIaLgktYvK2PibRdzGx7zrcEbtx42Y6Q64Xt/VlJWLVoyvUcT/JiLmyk5mHMF8NFsP yKBFDQYsyuOdE/q+/2ytR9dV9H1+St8Wne5UkElrXMc41HZoOObayz7bZv7Qd9gzbPWT SmBKGDs4mLjUzT4FUhRn/F4sdfZQz2LcEzIC4oTH71Bt6OBwghBNLxP1BxxKzZKfw5cV RF/PUqUT14pFHaaRo80b6or0vFlKnF73mJeMftaxp7NdRvBw+ChW12PDPNUVMZqp0vjs h0p3YthlhjmoYsdSdlR7amReelCPNPp/9uY5CVqU3abGtTZu8hlhLGOPUfbKMYu4mMp2 lPAA==
X-Gm-Message-State ALoCoQmxBBFn45jXB/84s/RN8VoJTMhWQ33N4LvFrIRYyBh8UusBISfFhldeO4n5rLM8PZhSuLXr
X-Received by 10.50.30.105 with SMTP id r9mr93737733igh.11.1436398884528; Wed, 08 Jul 2015 16:41:24 -0700 (PDT)
X-X-Sender rientjes@chino.kir.corp.google.com
User-Agent Alpine 2.10 (DEB 1266 2009-07-14)
MIME-Version 1.0
Content-Type TEXT/PLAIN; charset=US-ASCII
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Wed, 8 Jul 2015 16:41:23 -0700 (PDT)
X-Original-Message-ID <alpine.DEB.2.10.1507081638290.16585@chino.kir.corp.google.com>
X-Original-References <1436360661-31928-1-git-send-email-mhocko@suse.com> <1436360661-31928-5-git-send-email-mhocko@suse.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1180304

Show key headers only | View raw


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] oom: split out forced OOM killer Michal Hocko <mhocko@suse.com> - 2015-07-08 15:10 +0200
  Re: [PATCH 4/4] oom: split out forced OOM killer David Rientjes <rientjes@google.com> - 2015-07-09 01:50 +0200

csiph-web