dect
/
linux-2.6
Archived
13
0
Fork 0

rcu: ignore offline CPUs in last non-dyntick-idle CPU check

Offline CPUs are not in nohz_cpu_mask, but can be ignored when checking
for the last non-dyntick-idle CPU.  This patch therefore only checks
online CPUs for not being dyntick idle, allowing fast entry into
full-system dyntick-idle state even when there are some offline CPUs.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
Lai Jiangshan 2010-03-30 18:40:36 +08:00 committed by Paul E. McKenney
parent 0c34029abd
commit 5db356736a
1 changed files with 1 additions and 1 deletions

View File

@ -1016,7 +1016,7 @@ int rcu_needs_cpu(int cpu)
/* Don't bother unless we are the last non-dyntick-idle CPU. */
for_each_cpu_not(thatcpu, nohz_cpu_mask)
if (thatcpu != cpu) {
if (cpu_online(thatcpu) && thatcpu != cpu) {
per_cpu(rcu_dyntick_drain, cpu) = 0;
per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
return rcu_needs_cpu_quick_check(cpu);