linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Yafang Shao <laoar.shao@gmail.com>,
	rientjes@google.com, akpm@linux-foundation.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm, oom: check memcg margin for parallel oom
Date: Tue, 14 Jul 2020 14:57:21 +0200	[thread overview]
Message-ID: <20200714125721.GK24642@dhcp22.suse.cz> (raw)
In-Reply-To: <83fececb-924c-0e1b-8e48-547b93593650@i-love.sakura.ne.jp>

On Tue 14-07-20 21:47:06, Tetsuo Handa wrote:
> On 2020/07/14 21:37, Michal Hocko wrote:
> > -	if (mutex_lock_killable(&oom_lock))
> > +	if (!mutex_trylock(&oom_lock))
> >  		return true;
> 
> I don't like this change. The trylock needlessly wastes CPU time which could
> have been utilized by the OOM killer/reaper for reclaiming memory.

Ohh, that was an unintended hunk which stayed there from the previous
discussion. With the margin check the lock itself can stay.
> 
> Rather, I want to change
> 
> -	if (!mutex_trylock(&oom_lock)) {
> +	if (mutex_lock_killable(&oom_lock)) {
> 
> in __alloc_pages_may_oom() side.

Please do not start a tangent discussion again. If you want to make this
change then post a patch with a justification.
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-07-14 12:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 12:08 Yafang Shao
2020-07-14 12:37 ` Michal Hocko
2020-07-14 12:38   ` Michal Hocko
2020-07-14 13:26     ` Yafang Shao
2020-07-14 12:47   ` Tetsuo Handa
2020-07-14 12:57     ` Michal Hocko [this message]
2020-07-14 13:25   ` Yafang Shao
2020-07-14 13:34     ` Michal Hocko
2020-07-14 13:40       ` Yafang Shao

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=20200714125721.GK24642@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --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