From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Michal Hocko <mhocko@suse.com>, akpm@linux-foundation.org
Cc: guro@fb.com, linux-mm <linux-mm@kvack.org>,
rientjes@google.com, shakeelb@google.com,
Yafang Shao <laoar.shao@gmail.com>
Subject: Re: [nacked] mm-oom-avoid-printk-iteration-under-rcu.patch removed from -mm tree
Date: Sat, 18 Apr 2020 19:13:57 +0900 [thread overview]
Message-ID: <68371d79-dfae-e9b9-38df-dbb916607a82@i-love.sakura.ne.jp> (raw)
In-Reply-To: <20200417152637.GQ26707@dhcp22.suse.cz>
On 2020/04/18 0:26, Michal Hocko wrote:
> On Fri 17-04-20 23:33:41, Tetsuo Handa wrote:
>> On 2020/01/31 13:33, akpm@linux-foundation.org wrote:
>>> The patch titled
>>> Subject: mm, oom: avoid printk() iteration under RCU
>>> has been removed from the -mm tree. Its filename was
>>> mm-oom-avoid-printk-iteration-under-rcu.patch
>>>
>>> This patch was dropped because it was nacked
>>
>> This patch was once nacked by Michal Hocko. But based on
>> https://lkml.kernel.org/r/CALOAHbArHa-QZ2hXnLOhEJ3Ti=C69-LPtjZB9zqPcuTKeHsV4g@mail.gmail.com
>> that dump_tasks() will become a real world problem with slow consoles (even if
>> printk() becomes asynchronous), I propose you to revive this patch as a first step for
>> implementing workable ratelimit for dump_tasks(). This patch can be applied as-is
>> on current linux.git and linux-next.git (only offset difference).
>
> My nack still applies. Slow consoles are really a pain and they are
> going to be addressed by the upcoming printk work from a large part.
> Your patch doesn't address the problem it merely shift it around while
> making code even more obscure and harder to maintain.
Your nack is wrong. The upcoming printk work will not address the problem.
>
> For the specific issue that you are pointing out, a simple and working
> workaround is to reduce the loglevel or disable dump_tasks. There is no
> real reason to add ugly kluges IMHO.
I do need dump_tasks() output in order to understand memory usage as of
invocation of the OOM killer (rather than verifying whether the OOM killer
chose appropriate OOM victim). I really do not want to reduce the loglevel
or disable dump_tasks().
You are misunderstanding the problem. Asynchronous printk() cannot solve a problem
that printk() buffer is needlessly flooded with OOM related messages, which can
result in loss of non OOM-related messages if console is slow and can result in
bloating of log files if console is not slow. My proposal is to minimize duplicated
OOM-related messages by keeping dump_task() synchronous (even if printk() becomes
asynchronous) by offloading the printing to a workqueue context. This patch is the
first step for making it possible to offload the printing to a workqueue context.
Waiting for printk() to become asynchronous is completely irrelevant.
next prev parent reply other threads:[~2020-04-18 10:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200131043324.wkArXTf6-%akpm@linux-foundation.org>
2020-04-17 14:33 ` Tetsuo Handa
2020-04-17 15:26 ` Michal Hocko
2020-04-18 10:13 ` Tetsuo Handa [this message]
2020-04-20 7:33 ` Michal Hocko
2020-04-22 6:40 ` Tetsuo Handa
2020-04-22 6:59 ` Michal Hocko
2020-04-23 5:34 ` Tetsuo Handa
2020-04-23 6:35 ` Yafang Shao
2020-04-23 7:34 ` Michal Hocko
2020-04-23 10:22 ` Yafang Shao
2020-04-23 11:07 ` Michal Hocko
2020-04-23 13:28 ` Tetsuo Handa
2020-04-23 14:06 ` Michal Hocko
2020-04-23 14:14 ` Tetsuo Handa
2020-04-23 14:35 ` Michal Hocko
2020-04-24 13:02 ` Steven Rostedt
2020-04-24 15:18 ` Michal Hocko
2020-04-23 15:54 ` Sergey Senozhatsky
2020-04-23 22:56 ` Tetsuo Handa
2020-04-24 0:56 ` Yafang Shao
2020-04-24 1:16 ` Tetsuo Handa
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=68371d79-dfae-e9b9-38df-dbb916607a82@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=laoar.shao@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--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