Messages in this thread Patch in this message | | | Date | Tue, 02 Nov 2004 15:06:54 +1100 | From | Con Kolivas <> | Subject | [PATCH] adjust timeslice granularity |
| |
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>
Index: linux-2.6.10-rc1-mm2/kernel/sched.c =================================================================== --- linux-2.6.10-rc1-mm2.orig/kernel/sched.c 2004-11-02 13:51:39.000000000 +1100 +++ linux-2.6.10-rc1-mm2/kernel/sched.c 2004-11-02 14:19:32.973509317 +1100 @@ -133,12 +133,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 [unhandled content-type:application/pgp-signature] | |