From: Anton Blanchard The per cpu schedule counters need to be summed up over all possible cpus. When testing hotplug cpu remove I saw the sum of the online cpu count for nr_uninterruptible go negative which made the load average go nuts. Signed-off-by: Andrew Morton --- 25-akpm/kernel/sched.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN kernel/sched.c~sched-use-for_each_cpu kernel/sched.c --- 25/kernel/sched.c~sched-use-for_each_cpu 2004-08-01 23:09:03.780865680 -0700 +++ 25-akpm/kernel/sched.c 2004-08-01 23:09:03.792863856 -0700 @@ -924,7 +924,7 @@ unsigned long nr_uninterruptible(void) { unsigned long i, sum = 0; - for_each_online_cpu(i) + for_each_cpu(i) sum += cpu_rq(i)->nr_uninterruptible; return sum; @@ -934,7 +934,7 @@ unsigned long long nr_context_switches(v { unsigned long long i, sum = 0; - for_each_online_cpu(i) + for_each_cpu(i) sum += cpu_rq(i)->nr_switches; return sum; @@ -944,7 +944,7 @@ unsigned long nr_iowait(void) { unsigned long i, sum = 0; - for_each_online_cpu(i) + for_each_cpu(i) sum += atomic_read(&cpu_rq(i)->nr_iowait); return sum; _