From: rcochran-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Anna-Maria Gleixner
<anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: [patch 61/66] timers: Convert to hotplug state machine
Date: Tue, 26 Jul 2016 17:42:27 +0200 [thread overview]
Message-ID: <20160726154227.GC23707@linutronix.de> (raw)
In-Reply-To: <7d37714e-b072-ee90-f14f-364f4fd01f0d-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Jon,
On Mon, Jul 25, 2016 at 03:56:48PM +0100, Jon Hunter wrote:
> > When tearing down, call timers_dead_cpu before notify_dead.
> > There is a hidden dependency between:
> >
> > - timers
> > - Block multiqueue
> > - rcutree
> >
> > If timers_dead_cpu() comes later than blk_mq_queue_reinit_notify()
> > that latter function causes a RCU stall.
>
> After this change is applied I am seeing RCU stalls during suspend
> on Tegra. I guess I am hitting the case mentioned above? How should
> this be avoided?
Contrary to the commit message, this callback ended up in the wrong
place within the sequence. (It was correct in an earlier version, but
the series has been through many changes.)
Can you try this patch to see if it avoids the stall, please?
Thanks,
Richard
---
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 6d405db..242bf53 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -20,9 +20,9 @@ enum cpuhp_state {
CPUHP_PROFILE_PREPARE,
CPUHP_X2APIC_PREPARE,
CPUHP_SMPCFD_PREPARE,
- CPUHP_TIMERS_DEAD,
CPUHP_RCUTREE_PREP,
CPUHP_NOTIFY_PREPARE,
+ CPUHP_TIMERS_DEAD,
CPUHP_BRINGUP_CPU,
CPUHP_AP_IDLE_DEAD,
CPUHP_AP_OFFLINE,
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 67f4943..8d65510 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1208,11 +1208,6 @@ static struct cpuhp_step cpuhp_bp_states[] = {
.startup = smpcfd_prepare_cpu,
.teardown = smpcfd_dead_cpu,
},
- [CPUHP_TIMERS_DEAD] = {
- .name = "timers dead",
- .startup = NULL,
- .teardown = timers_dead_cpu,
- },
[CPUHP_RCUTREE_PREP] = {
.name = "RCU-tree prepare",
.startup = rcutree_prepare_cpu,
@@ -1229,6 +1224,11 @@ static struct cpuhp_step cpuhp_bp_states[] = {
.skip_onerr = true,
.cant_stop = true,
},
+ [CPUHP_TIMERS_DEAD] = {
+ .name = "timers dead",
+ .startup = NULL,
+ .teardown = timers_dead_cpu,
+ },
/* Kicks the plugged cpu into life */
[CPUHP_BRINGUP_CPU] = {
.name = "cpu:bringup",
next prev parent reply other threads:[~2016-07-26 15:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160711122450.923603742@linutronix.de>
[not found] ` <20160711122535.775201614@linutronix.de>
[not found] ` <20160711122535.775201614-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2016-07-25 14:56 ` [patch 61/66] timers: Convert to hotplug state machine Jon Hunter
[not found] ` <7d37714e-b072-ee90-f14f-364f4fd01f0d-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-07-25 15:35 ` rcochran-hfZtesqFncYOwBW4kG4KsQ
[not found] ` <20160725153543.GB10939-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2016-07-25 20:46 ` rcochran-hfZtesqFncYOwBW4kG4KsQ
[not found] ` <20160725204648.GA22830-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2016-07-26 9:23 ` Jon Hunter
2016-07-26 9:20 ` Jon Hunter
2016-07-26 14:15 ` Thomas Gleixner
2016-07-26 18:20 ` Jon Hunter
[not found] ` <0b5a7bb5-6670-606b-e33d-63cd8b0fcedd-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-07-26 14:40 ` rcochran-hfZtesqFncYOwBW4kG4KsQ
2016-07-26 18:22 ` Jon Hunter
2016-07-26 15:42 ` rcochran-hfZtesqFncYOwBW4kG4KsQ [this message]
[not found] ` <20160726154227.GC23707-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2016-07-26 18:16 ` Jon Hunter
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=20160726154227.GC23707@linutronix.de \
--to=rcochran-hfztesqfncyowbw4kg4ksq@public.gmane.org \
--cc=anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
/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