lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: migrate_disable() race with cpu hotplug?
On Tue, 26 Jul 2011, Yong Zhang wrote:

> When reading the code, I'm afraid there is a race between migrate_disable()
> and cpu hotplug. A scenario will like below:
>
> CPU0 CPU1
> _cpu_down();
> cpu_unplug_begin();
> wait_for_completion()
> sync_unplug_thread();
> complete();
> race_window? /*
> * migrate_disable() will
> * not take effect since
> * hotplug is in progress
> */

Rightfully so. The caller will just block on the cpu_hotplug.lock
mutex until the unplug operation will be done.

Thanks,

tglx


\
 
 \ /
  Last update: 2011-07-27 23:55    [W:0.155 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site