From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Yafang Shao <laoar.shao@gmail.com>, Michal Hocko <mhocko@kernel.org>
Cc: 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 20:06:17 +0900 [thread overview]
Message-ID: <253332d9-9f8c-d472-0bf4-388b29ecfb96@i-love.sakura.ne.jp> (raw)
In-Reply-To: <CALOAHbDb=nYmwTJ5RpMfG_iNf2XAFWsSbEoR+=gjxLUNzxLxvQ@mail.gmail.com>
On 2020/07/20 19:36, Yafang Shao wrote:
> On Mon, Jul 20, 2020 at 3:16 PM Michal Hocko <mhocko@kernel.org> wrote:
>> I do agree that a silent bail out is not the best thing to do. The above
>> message would be more useful if it also explained what the oom killer
>> does (or does not):
>>
>> "OOM victim %d (%s) is already exiting. Skip killing the task\n"
>>
>
> Sure.
This path is rarely hit because find_lock_task_mm() in oom_badness() from
select_bad_process() in the next round of OOM killer will skip this task.
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?
next prev parent reply other threads:[~2020-07-20 11:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-19 13:53 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 [this message]
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
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=253332d9-9f8c-d472-0bf4-388b29ecfb96@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=laoar.shao@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--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