lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] rcu: more careful check for the last non-dyntick-idle CPU
Warning: I just did build test.

Subject: [PATCH] rcu: more careful check for the last non-dyntick-idle CPU

If a CPU is not in nohz_cpu_mask, it does not means this
CPU is a non-dyntick-idle CPU, because this CPU may be offline or not exist.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 4befb64..6086a7d 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1026,7 +1026,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);

\
 
 \ /
  Last update: 2010-03-30 12:43    [W:0.040 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site