linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: akpm@linux-foundation.org, shakeelb@google.com,
	hannes@cmpxchg.org, mhocko@kernel.org, guro@fb.com,
	gthelen@google.com, linux-mm@kvack.org
Subject: Re: [PATCH v2 1/2] mm, memcg: rename mem_cgroup_out_of_memory()
Date: Mon, 4 May 2020 16:50:44 +0100	[thread overview]
Message-ID: <20200504155044.GA271310@chrisdown.name> (raw)
In-Reply-To: <20200504042621.10334-2-laoar.shao@gmail.com>

Yafang Shao writes:
>Rename mem_cgroup_out_of_memory() to mem_cgroup_oom_kill() to indicate
>that this function is used to try to kill a process.
>With this change it will cooperate better with the oom events.
>	function		memcg event
>	mem_cgroup_oom()	oom
>	mem_cgroup_oom_kill()	oom_kill

Hmm. The reason it's called mem_cgroup_out_of_memory() is, as Michal said, to 
match out_of_memory, which may or may not OOM kill. Internally, 
mem_cgroup_out_of_memory() may also do this depending on the state of oom_lock 
and the current task, so mem_cgroup_out_of_memory() is really about *deciding* 
what to do when generically out of memory rather than necessarily OOM killing 
something (although yes, that's the general outcome).

Is matching the memcg event names the only reason you'd like to do this, or are 
there more concerns you had? If that's the only case, I think let's keep it as 
is for now. :-)


  parent reply	other threads:[~2020-05-04 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  4:26 [PATCH v2 0/2]memcg oom: don't try to kill a process if there is no process Yafang Shao
2020-05-04  4:26 ` [PATCH v2 1/2] mm, memcg: rename mem_cgroup_out_of_memory() Yafang Shao
2020-05-04  7:59   ` Michal Hocko
2020-05-04 15:50   ` Chris Down [this message]
2020-05-04  4:26 ` [PATCH v2 2/2] mm, memcg: don't try to kill a process if memcg is not populated Yafang Shao
2020-05-04  8:18   ` Michal Hocko
2020-05-04 12:34     ` Yafang Shao
2020-05-04 12:46       ` Michal Hocko
2020-05-04 15:24         ` Yafang Shao
2020-05-04 16:11           ` Michal Hocko
2020-05-04 17:04             ` Roman Gushchin

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=20200504155044.GA271310@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=akpm@linux-foundation.org \
    --cc=gthelen@google.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=shakeelb@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;
as well as URLs for NNTP newsgroup(s).