aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 08:36:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 08:36:58 -0700
commit148086bb64694cc91624bab2a550d50f800eb4b7 (patch)
tree77e208ccee6fc97c608f6d827e2605345bf3b20d /kernel/sched_fair.c
parent4da7e90e653d67dfd405868246d316b04852e2d5 (diff)
parent3436ae1298cb22d722a6520fc97f112dd767a9e1 (diff)
downloadkernel_samsung_smdk4412-148086bb64694cc91624bab2a550d50f800eb4b7.zip
kernel_samsung_smdk4412-148086bb64694cc91624bab2a550d50f800eb4b7.tar.gz
kernel_samsung_smdk4412-148086bb64694cc91624bab2a550d50f800eb4b7.tar.bz2
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix rebalance interval calculation sched, doc: Beef up load balancing description sched: Leave sched_setscheduler() earlier if possible, do not disturb SCHED_FIFO tasks
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 3f7ec9e..c7ec5c8 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -22,6 +22,7 @@
#include <linux/latencytop.h>
#include <linux/sched.h>
+#include <linux/cpumask.h>
/*
* Targeted preemption latency for CPU-bound tasks:
@@ -3850,8 +3851,8 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)
interval = msecs_to_jiffies(interval);
if (unlikely(!interval))
interval = 1;
- if (interval > HZ*NR_CPUS/10)
- interval = HZ*NR_CPUS/10;
+ if (interval > HZ*num_online_cpus()/10)
+ interval = HZ*num_online_cpus()/10;
need_serialize = sd->flags & SD_SERIALIZE;