From: "Paul E. McKenney" <paulmck@kernel.org>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Frederic Weisbecker <frederic@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
stable@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Len Brown <lenb@kernel.org>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 0/4] sched/idle: Fix missing need_resched() checks after rcu_idle_enter()
Date: Fri, 1 Jan 2021 08:05:11 -0800 [thread overview]
Message-ID: <20210101160511.GB12032@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <4de33f1a-890b-4d29-20e8-a1163b9c1bf7@intel.com>
On Tue, Dec 22, 2020 at 05:19:51PM +0100, Rafael J. Wysocki wrote:
> On 12/22/2020 2:37 AM, Frederic Weisbecker wrote:
> > With Paul, we've been thinking that the idle loop wasn't twisted enough
> > yet to deserve 2020.
> >
> > rcutorture, after some recent parameter changes, has been complaining
> > about a hung task.
> >
> > It appears that rcu_idle_enter() may wake up a NOCB kthread but this
> > happens after the last generic need_resched() check. Some cpuidle drivers
> > fix it by chance but many others don't.
> >
> > Here is a proposed bunch of fixes. I will need to also fix the
> > rcu_user_enter() case, likely using irq_work, since nohz_full requires
> > irq work to support self IPI.
> >
> > Also more generally, this raise the question of local task wake_up()
> > under disabled interrupts. When a wake up occurs in a preempt disabled
> > section, it gets handled by the outer preempt_enable() call. There is no
> > similar mechanism when a wake up occurs with interrupts disabled. I guess
> > it is assumed to be handled, at worst, in the next tick. But a local irq
> > work would provide instant preemption once IRQs are re-enabled. Of course
> > this would only make sense in CONFIG_PREEMPTION, and when the tick is
> > disabled...
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> > sched/idle
> >
> > HEAD: f2fa6e4a070c1535b9edc9ee097167fd2b15d235
> >
> > Thanks,
> > Frederic
> > ---
> >
> > Frederic Weisbecker (4):
> > sched/idle: Fix missing need_resched() check after rcu_idle_enter()
> > cpuidle: Fix missing need_resched() check after rcu_idle_enter()
> > ARM: imx6q: Fix missing need_resched() check after rcu_idle_enter()
> > ACPI: processor: Fix missing need_resched() check after rcu_idle_enter()
> >
> >
> > arch/arm/mach-imx/cpuidle-imx6q.c | 7 ++++++-
> > drivers/acpi/processor_idle.c | 10 ++++++++--
> > drivers/cpuidle/cpuidle.c | 33 +++++++++++++++++++++++++--------
> > kernel/sched/idle.c | 18 ++++++++++++------
> > 4 files changed, 51 insertions(+), 17 deletions(-)
>
> Please feel free to add
>
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> to all patches in the series.
I would guess that they will take some other path to mainline, but I have
queued these to cut down on rcutorture's whining. ;-)
Thanx, Paul
prev parent reply other threads:[~2021-01-01 16:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 1:37 [PATCH 0/4] sched/idle: Fix missing need_resched() checks after rcu_idle_enter() Frederic Weisbecker
2020-12-22 1:37 ` [PATCH 1/4] sched/idle: Fix missing need_resched() check " Frederic Weisbecker
2020-12-22 4:20 ` Paul E. McKenney
2020-12-22 1:37 ` [PATCH 2/4] cpuidle: " Frederic Weisbecker
2021-01-05 17:25 ` Dmitry Osipenko
2021-01-05 18:10 ` Dmitry Osipenko
2021-01-05 19:17 ` Paul E. McKenney
2020-12-22 1:37 ` [PATCH 3/4] ARM: imx6q: " Frederic Weisbecker
2020-12-22 1:37 ` [PATCH 4/4] ACPI: processor: " Frederic Weisbecker
2020-12-22 16:19 ` [PATCH 0/4] sched/idle: Fix missing need_resched() checks " Rafael J. Wysocki
2021-01-01 16:05 ` Paul E. McKenney [this message]
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=20210101160511.GB12032@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=festevam@gmail.com \
--cc=frederic@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lenb@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).