Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1372787
| From | Heiko Carstens <heiko.carstens@de.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpu/hotplug: fix rollback during error-out in __cpu_disable() |
| Date | 2016-04-06 22:00 +0200 |
| Message-ID | <rl1Mm-uH-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <rkxuV-2zD-7@gated-at.bofh.it> <rkxOi-2K6-5@gated-at.bofh.it> <rkxOj-2K6-31@gated-at.bofh.it> <rky7E-3bC-35@gated-at.bofh.it> <rkByx-6bC-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 05, 2016 at 05:59:04PM +0200, Sebastian Andrzej Siewior wrote:
> If we error out in __cpu_disable() (via takedown_cpu() which is
> currently the last one that can fail) we don't rollback entirely to
> CPUHP_ONLINE (where we started) but to CPUHP_AP_ONLINE_IDLE. This
> happens because the former states were on the target CPU (the AP states)
> and during the rollback we go back until the first BP state we started.
> During the next cpu_down attempt (on the same failed CPU) will take
> forever because the cpuhp thread is still down.
>
> The fix this I rollback to where we started in _cpu_down() via a workqueue
> to ensure that those callback will be run on the target CPU in
> non-atomic context (as in normal cpu_up()).
> The workqueues should be working again because the CPU_DOWN_FAILED were
> already invoked.
>
> notify_online() has been marked as ->skip_onerr because otherwise we
> will see the CPU_ONLINE notifier in addition to the CPU_DOWN_FAILED.
> However with ->skip_onerr we neither see CPU_ONLINE nor CPU_DOWN_FAILED
> if something in between (CPU_DOWN_FAILED … CPUHP_TEARDOWN_CPU).
> Currently there is nothing.
>
> This regression got probably introduce in the rework while we introduced
> the hotplug thread to offload the work to the target CPU.
>
> Fixes: 4cb28ced23c4 ("cpu/hotplug: Create hotplug threads")
> Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> kernel/cpu.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
This fixes the issue that a second cpu_down() will take forever, if
__cpu_disable() fails.
However it does not fix the issue that CPU_DOWN_FAILED will be seen on a
different cpu than the cpu that was supposed to be taken offline.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] s390/cpum_sf: Remove superfluous SMP function call Anna-Maria Gleixner <anna-maria@linutronix.de> - 2016-04-04 12:30 +0200
Re: [PATCH] s390/cpum_sf: Remove superfluous SMP function call Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-05 12:50 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Sebastian Andrzej Siewior <sebastian.siewior@linutronix.de> - 2016-04-05 13:20 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-05 13:30 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-05 13:40 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-05 14:00 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call rcochran@linutronix.de - 2016-04-05 14:00 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Sebastian Andrzej Siewior <sebastian.siewior@linutronix.de> - 2016-04-05 14:00 +0200
Re: [PREEMPT-RT] [PATCH] s390/cpum_sf: Remove superfluous SMP function call Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-05 14:20 +0200
Re: [PATCH] s390/cpum_sf: Remove superfluous SMP function call Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-05 14:20 +0200
[PATCH] cpu/hotplug: fix rollback during error-out in __cpu_disable() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-05 18:00 +0200
Re: [PATCH] cpu/hotplug: fix rollback during error-out in __cpu_disable() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-06 22:00 +0200
Re: [PATCH] cpu/hotplug: fix rollback during error-out in __cpu_disable() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-07 17:20 +0200
Re: [PATCH] cpu/hotplug: fix rollback during error-out in __cpu_disable() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-08 08:30 +0200
[PATCH v2] cpu/hotplug: fix rollback during error-out in __cpu_disable() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-08 14:50 +0200
csiph-web