Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: timers: fix TIMER_ABSTIME for process wide cpu timers timers: split process wide cpu clocks/timers, fix x86: clean up hpet timer reinit timers: split process wide cpu clocks/timers, remove spurious warning timers: split process wide cpu clocks/timers signal: re-add dead task accumulation stats. x86: fix hpet timer reinit for x86_64 sched: fix nohz load balancer on cpu offline
This commit is contained in:
@@ -3890,19 +3890,24 @@ int select_nohz_load_balancer(int stop_tick)
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
if (stop_tick) {
|
||||
cpumask_set_cpu(cpu, nohz.cpu_mask);
|
||||
cpu_rq(cpu)->in_nohz_recently = 1;
|
||||
|
||||
/*
|
||||
* If we are going offline and still the leader, give up!
|
||||
*/
|
||||
if (!cpu_active(cpu) &&
|
||||
atomic_read(&nohz.load_balancer) == cpu) {
|
||||
if (!cpu_active(cpu)) {
|
||||
if (atomic_read(&nohz.load_balancer) != cpu)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If we are going offline and still the leader,
|
||||
* give up!
|
||||
*/
|
||||
if (atomic_cmpxchg(&nohz.load_balancer, cpu, -1) != cpu)
|
||||
BUG();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
cpumask_set_cpu(cpu, nohz.cpu_mask);
|
||||
|
||||
/* time for ilb owner also to sleep */
|
||||
if (cpumask_weight(nohz.cpu_mask) == num_online_cpus()) {
|
||||
if (atomic_read(&nohz.load_balancer) == cpu)
|
||||
|
Reference in New Issue
Block a user