aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorCon Kolivas <kernel@kolivas.org>2005-01-07 21:45:57 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 21:45:57 -0800
commitb53c4efb5fe348108f4d3aa7ef9c5e72d0287b26 (patch)
treee5b8f8fbec5da20482ab07f1c40fcf5ae165f2d0 /kernel
parenta2e135bbe17c364910f9552ab456cd1f1622bb81 (diff)
downloadhistory-b53c4efb5fe348108f4d3aa7ef9c5e72d0287b26.tar.gz
[PATCH] sched: adjust_timeslice_granularity
The minimum timeslice was decreased from 10ms to 5ms. In the process, the timeslice granularity was leading to much more rapid round robinning of interactive tasks at cache trashing levels. Restore minimum granularity to 10ms. Signed-off-by: Con Kolivas <kernel@kolivas.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 2acb5ebfb78022..2efcc7c5b1fbd1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -132,12 +132,14 @@
(NS_TO_JIFFIES((p)->sleep_avg) * MAX_BONUS / \
MAX_SLEEP_AVG)
+#define GRANULARITY (10 * HZ / 1000 ? : 1)
+
#ifdef CONFIG_SMP
-#define TIMESLICE_GRANULARITY(p) (MIN_TIMESLICE * \
+#define TIMESLICE_GRANULARITY(p) (GRANULARITY * \
(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \
num_online_cpus())
#else
-#define TIMESLICE_GRANULARITY(p) (MIN_TIMESLICE * \
+#define TIMESLICE_GRANULARITY(p) (GRANULARITY * \
(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)))
#endif