public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [sched-int-changes 2/5] adjust_timeslice_granularity
@ 2004-11-06 10:32 Con Kolivas
  0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-11-06 10:32 UTC (permalink / raw)
  To: linux; +Cc: Andrew Morton, Ingo Molnar


[-- Attachment #1.1: Type: text/plain, Size: 75 bytes --]

adjust_timeslice_granularity

Please include in at least one -mm release.


[-- Attachment #1.2: sched-adjust_timeslice_granularity.diff --]
[-- Type: text/x-patch, Size: 1066 bytes --]

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-mm3/kernel/sched.c
===================================================================
--- linux-2.6.10-rc1-mm3.orig/kernel/sched.c	2004-11-05 20:54:25.302964953 +1100
+++ linux-2.6.10-rc1-mm3/kernel/sched.c	2004-11-05 20:56:46.608179150 +1100
@@ -134,12 +134,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
 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-06 10:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-06 10:32 [PATCH] [sched-int-changes 2/5] adjust_timeslice_granularity Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox