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>,
	David Rientjes <rientjes@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH] mm, oom: show process exiting information in __oom_kill_process()
Date: Mon, 20 Jul 2020 16:23:56 +0200	[thread overview]
Message-ID: <20200720142356.GI4074@dhcp22.suse.cz> (raw)
In-Reply-To: <a4df8ecc-7764-e0fd-8778-3a2cdcd526c0@i-love.sakura.ne.jp>

On Mon 20-07-20 23:03:46, Tetsuo Handa wrote:
> On 2020/07/20 22:41, Michal Hocko wrote:
> >> Since we don't wake up the OOM reaper when hitting this path, unless __mmput()
> >> for this task itself immediately reclaims memory and updates the statistics
> >> counter, we just get two chunks of dump_header() messages and one OOM victim.
> >>
> >> Current synchronous printk() gives __mmput() some time for reclaiming memory
> >> and updating the statistics counter. But when printk() becomes asynchronous,
> >> there might be quite small time. People might wonder "why killed message
> >> follows immediately after skipped killing message"... Wouldn't the skip
> >> message confuse people?
> > 
> > I would ask other way around. Wouldn't that give us a better clue that
> > the first oom invocation and the back off was a suboptimal decision? If
> > we learn about more of those, maybe we want to reconsider this heuristic
> > and rather retry the victim selection instead.
> 
> I've just suggested
> 
>   Maybe the better behavior is to restart out_of_memory() without dump_header()
>   (we can remember whether we already called dump_header() into "struct oom_control"),
>   with last second watermark check before select_bad_process() and after dump_header().
> 
> at https://lkml.kernel.org/r/7f58363a-db1a-5502-e2b4-ee4b9fa31824@i-love.sakura.ne.jp .

As soon as we learn about more of those as mentioned above.

-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-07-20 14:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 13:53 [PATCH] mm, oom: show process exiting information in __oom_kill_process() Yafang Shao
2020-07-19 23:20 ` Tetsuo Handa
2020-07-20  1:43   ` Yafang Shao
2020-07-20  7:16 ` Michal Hocko
2020-07-20 10:36   ` Yafang Shao
2020-07-20 11:06     ` Tetsuo Handa
2020-07-20 12:19       ` Yafang Shao
2020-07-20 13:11         ` Tetsuo Handa
2020-07-20 13:59           ` Yafang Shao
2020-07-20 13:41       ` Michal Hocko
2020-07-20 14:03         ` Tetsuo Handa
2020-07-20 14:23           ` Michal Hocko [this message]
2020-07-20 13:35     ` Michal Hocko

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=20200720142356.GI4074@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;
as well as URLs for NNTP newsgroup(s).