All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Yafang Shao <laoar.shao@gmail.com>, Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [RFC PATCH] mm, oom: oom ratelimit auto tuning
Date: Wed, 15 Apr 2020 14:58:22 +0900	[thread overview]
Message-ID: <634bab6a-fee1-45b8-62af-be03062ae2bf@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <CALOAHbBsdEH4YAFefybV7sOLB0BH3H5ry1gQdb0+JW270Qpffw@mail.gmail.com>

On 2020/04/14 23:58, Yafang Shao wrote:
>>>>> The OOM ratelimit starts with a slow rate, and it will increase slowly
>>>>> if the speed of the console is rapid and decrease rapidly if the speed
>>>>> of the console is slow. oom_rs.burst will be in [1, 10] and
>>>>> oom_rs.interval will always greater than 5 * HZ.
>>>>
>>>> I am not against increasing the ratelimit timeout. But this patch seems
>>>> to be trying to be too clever.  Why cannot we simply increase the
>>>> parameters of the ratelimit?
>>>
>>> I justed worried that the user may complain it if too many
>>> oom_kill_process callbacks are suppressed.
>>
>> This can be a real concern indeed.

I'm proposing automated ratelimiting of dump_tasks() at
http://lkml.kernel.org/r/1563360901-8277-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp .
I believe that automated ratelimiting of dump_tasks() remains necessary
even after printk() became asynchronous.

>>
>>> But considering that OOM burst at the same time are always because of
>>> the same reason,
>>
>> This is not really the case. Please note that many parallel OOM killers
>> might happen in memory cgroup setups.
>>
>>> so I think one snapshot of the OOM may be enough.
>>> Simply setting oom_rs with {20 * HZ, 1} can resolve this issue.
>>
>> Does it really though? The ratelimit doesn't stop the long taking
>> output. It simply cannot because the work is already done.
>>
>> That being said, making the ratelimiting more aggressive sounds more
>> like a workaround than an actual fix. So I would go that route only if
>> there is no other option. I believe the real problem here is in printk
>> being too synchronous here. This is a general problem and something
>> printk maintainers are already working on.
>>
> 
> Yes, printk being too sync is the real issue. If the printk an be
> async, then we don't need to worry about it at all.

I strongly disagree. dump_tasks() will needlessly fill printk() log buffer
(and potentially loose other kernel messages due to buffer full / disk full).

By the way, Petr and Sergey, how is the progress of making printk() asynchronous?
When can we expect that work to be merged?



  reply	other threads:[~2020-04-15  5:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  9:36 [RFC PATCH] mm, oom: oom ratelimit auto tuning Yafang Shao
2020-04-14  7:39 ` Michal Hocko
2020-04-14 12:32   ` Yafang Shao
2020-04-14 14:32     ` Michal Hocko
2020-04-14 14:58       ` Yafang Shao
2020-04-15  5:58         ` Tetsuo Handa [this message]
2020-04-17 11:57           ` Yafang Shao
2020-04-17 13:03             ` Tetsuo Handa
2020-04-17 13:55               ` 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=634bab6a-fee1-45b8-62af-be03062ae2bf@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=pmladek@suse.com \
    --cc=sergey.senozhatsky@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.