summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-28 00:00:36 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-10-28 00:00:36 -0800
commit3bf97e49ee9bae1cd6029ce19be31975000fe94b (patch)
tree343737172c5ca478dbcf0ba7b6c7c8ac50cc5086 /kernel
parentb51c26f738991d1777be8bec11a9f3a1b14de3fc (diff)
[PATCH] RCU idle detection fix
Patch from Dipankar Sarma <dipankar@in.ibm.com> There is a check in RCU for idle CPUs which signifies quiescent state (and hence no reference to RCU protected data) which was broken when interrupt counters were changed to use thread_info->preempt_count. Martin's 32 CPU machine with many idle CPUs was not completing any RCU grace period because RCU was forever waiting for idle CPUs to context switch. Had the idle check worked, this would not have happened. With no RCU happening, the dentries were getting "freed" (dentry stats showing that) but not getting returned to slab. This would not show up in systems that are generally busy as context switches then would happen in all CPUs and the per-CPU quiescent state counter would get incremented during context switch.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcupdate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index dfdf1774489d..1a149dff7832 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -192,7 +192,8 @@ static void rcu_process_callbacks(unsigned long unused)
void rcu_check_callbacks(int cpu, int user)
{
if (user ||
- (idle_cpu(cpu) && !in_softirq() && hardirq_count() <= 1))
+ (idle_cpu(cpu) && !in_softirq() &&
+ hardirq_count() <= (1 << HARDIRQ_SHIFT)))
RCU_qsctr(cpu)++;
tasklet_schedule(&RCU_tasklet(cpu));
}