From: Mel Gorman <mgorman@suse.de>
To: Josh Don <joshdon@google.com>
Cc: Ingo Molnar <mingo@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
David Rientjes <rientjes@google.com>,
Oleg Rombakh <olegrom@google.com>, Paul Turner <pjt@google.com>
Subject: Re: [PATCH] sched: Warn on long periods of pending need_resched
Date: Fri, 19 Mar 2021 09:02:52 +0000 [thread overview]
Message-ID: <20210319090252.GF15768@suse.de> (raw)
In-Reply-To: <CABk29NvGx6KQa_+RU-6xmL6mUeBrqZjH1twOw93SCVD-NZkbMQ@mail.gmail.com>
On Wed, Mar 17, 2021 at 05:06:31PM -0700, Josh Don wrote:
> On Wed, Mar 17, 2021 at 1:25 AM Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Josh Don <joshdon@google.com> wrote:
> >
> > > If resched_latency_warn_ms is set to the default value, only one warning
> > > will be produced per boot.
> >
> > Looks like a value hack, should probably be a separate flag,
> > defaulting to warn-once.
>
> Agreed, done.
>
> > > This warning only exists under CONFIG_SCHED_DEBUG. If it goes off, it is
> > > likely that there is a missing cond_resched() somewhere.
> >
> > CONFIG_SCHED_DEBUG is default-y, so most distros have it enabled.
>
> To avoid log spam for people who don't care, I was considering having
> the feature default disabled. Perhaps a better alternative is to only
> show a single line warning and not print the full backtrace by
> default. Does the latter sound good to you?
>
Default disabling and hidden behind a static branch would be useful
because the majority of users are not going to know what to do about
a need_resched warning and the sysctl is not documented. As Ingo said,
SCHED_DEBUG is enabled by default a lot. While I'm not sure what motivates
most distributions, I have found it useful to display topology information
on boot and in rare cases, for the enabling/disabling of sched features.
Hence, sched debug features should avoid adding too much overhead where
possible.
The static branch would mean splitting the very large inline functions
adding by the patch. The inline section should do a static check only and
do the main work in a function in kernel/sched/debug.c so it has minimal
overhead if unused.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2021-03-19 9:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 4:59 [PATCH] sched: Warn on long periods of pending need_resched Josh Don
2021-03-17 8:25 ` Ingo Molnar
2021-03-18 0:06 ` Josh Don
2021-03-19 9:02 ` Mel Gorman [this message]
2021-03-23 3:35 ` Josh Don
2021-03-17 8:31 ` Ingo Molnar
2021-03-18 0:17 ` Josh Don
2021-03-18 14:31 ` [sched] 663017c554: WARNING:at_kernel/sched/core.c:#scheduler_tick kernel test robot
2021-03-18 20:41 ` Josh Don
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=20210319090252.GF15768@suse.de \
--to=mgorman@suse.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=olegrom@google.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=yzaikin@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).