[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 32/35] clockevents: Fix cpu down race for hrtimer based broadcasting

On 02/17/2015 04:09 PM, Peter Zijlstra wrote:
>> [PATCH 11/35] clockevents: Cleanup dead cpu explicitely
n Tue, Feb 17, 2015 at 09:33:45AM +0530, Preeti U Murthy wrote:
>> On 02/16/2015 05:45 PM, Peter Zijlstra wrote:
>>>> From: Thomas Gleixner <>
>>>> @@ -428,7 +428,7 @@ static int __ref _cpu_down(unsigned int
>>>> __cpu_die(cpu);
>>>> /* CPU is completely dead: tell everyone. Too late to complain. */
>>>> - tick_cleanup_dead_cpu(cpu);
>>>> + tick_takeover(cpu);
>> Why is tick_handover() called after __cpu_die()?

> See: [PATCH 11/35] clockevents: Cleanup dead cpu explicitely
> it used to be a CPU_DEAD notifier.

> But, I think, the actual reason would be that you cannot be sure its not
> still ticking until its actually proper dead and buried, so trying to
> take over a tick from a cpu that's still ticking is... well, suspect.

Look at the changelog, it explains why tick_takeover must be called
*before* __cpu_die(). The above hunk is not solving the issue, it is
equivalent to the scenario where we took over broadcast duty in the
CPU_DEAD phase as a consequence of which the cpu doing the hotplug
operation is stuck sleeping forever. Cleanup functions can be handled
after __cpu_die() for the reason that you mention above.

Preeti U Murthy

 \ /
  Last update: 2015-02-18 04:21    [W:0.108 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site