From: Thomas Gleixner <tglx@linutronix.de>
To: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: aik@ozlabs.ru, shreyas@linux.vnet.ibm.com,
LKML <linux-kernel@vger.kernel.org>,
michael@ellerman.id.au, Peter Zijlstra <peterz@infradead.org>,
Anton Blanchard <anton@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug
Date: Thu, 22 Jan 2015 12:15:36 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.11.1501221209260.5526@nanos> (raw)
In-Reply-To: <54C09391.9080202@linux.vnet.ibm.com>
On Thu, 22 Jan 2015, Preeti U Murthy wrote:
> On 01/21/2015 05:16 PM, Thomas Gleixner wrote:
> How about when the cpu that is going offline receives a timer interrupt
> just before setting its state to CPU_DEAD ? That is still possible right
> given that its clock devices may not have been shutdown and it is
> capable of receiving interrupts for a short duration. Even with the
> above patch, is the following scenario possible ?
>
> CPU0 CPU1
> t0 Receives timer interrupt
>
> t1 Sees that there are hrtimers
> to be serviced (hrtimers are not yet migrated)
>
> t2 calls hrtimer_interrupt()
>
> t3 tick_program_event() CPU_DEAD notifiers
> CPU0's td->evtdev = NULL
>
> t4 clockevent_program_event()
> references NULL tick device pointer
>
> So my concern is that since the CLOCK_EVT_NOTIFY_CPU_DEAD callback
> handles shutting down of devices besides moving tick related duties.
> it's functions may race with the hotplug cpu still handling tick events.
__cpu_disable() is supposed to block interrupts on the dying cpu.
But I agree, we should make it more robust. So we want an explicit
call for disabling the cpu local stuff and an explicit takeover of the
broadcast duty. I'm anyway distangling the clockevents_notify() stuff,
so it should be simple to do so.
Thanks,
tglx
next prev parent reply other threads:[~2015-01-22 11:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 10:36 [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug Preeti U Murthy
2015-01-21 11:46 ` Thomas Gleixner
2015-01-22 6:07 ` Preeti U Murthy
2015-01-22 11:15 ` Thomas Gleixner [this message]
2015-01-27 3:31 ` Preeti U Murthy
2015-01-28 10:02 ` Preeti U Murthy
2015-01-28 21:31 ` Richard Cochran
2015-01-29 4:52 ` Preeti U Murthy
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=alpine.DEB.2.11.1501221209260.5526@nanos \
--to=tglx@linutronix.de \
--cc=aik@ozlabs.ru \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=preeti@linux.vnet.ibm.com \
--cc=shreyas@linux.vnet.ibm.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