All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]O20.1int
@ 2003-09-10  3:00 Con Kolivas
  2003-09-10  4:31 ` [PATCH]O20.1int Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Con Kolivas @ 2003-09-10  3:00 UTC (permalink / raw)
  To: linux kernel mailing list; +Cc: Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

Should be the last of the O1int patches.

Tiny tweak to keep top two interactive levels round robin at the fastest 
(10ms) which keeps X smooth when another interactive task is also using 
bursts of cpu (eg web browser).

Credit. Is this too bold?

Con

[-- Attachment #2: patch-O20-O20.1int --]
[-- Type: text/x-diff, Size: 1009 bytes --]

--- linux-2.6.0-test5-mm1-O20/kernel/sched.c	2003-09-10 11:15:45.000000000 +1000
+++ linux-2.6.0-test5-mm1/kernel/sched.c	2003-09-10 11:51:38.000000000 +1000
@@ -14,6 +14,7 @@
  *		an array-switch method of distributing timeslices
  *		and per-CPU runqueues.  Cleanups and useful suggestions
  *		by Davide Libenzi, preemptible kernel bits by Robert Love.
+ *  2003-09-03	Interactivity tuning by Con Kolivas.
  */
 
 #include <linux/mm.h>
@@ -122,12 +123,12 @@
 		MAX_SLEEP_AVG)
 
 #ifdef CONFIG_SMP
-#define TIMESLICE_GRANULARITY(p) \
-	(MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * \
-		num_online_cpus())
+#define TIMESLICE_GRANULARITY(p)	(MIN_TIMESLICE * \
+		(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \
+			num_online_cpus())
 #else
-#define TIMESLICE_GRANULARITY(p) \
-	(MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))))
+#define TIMESLICE_GRANULARITY(p)	(MIN_TIMESLICE * \
+		(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)))
 #endif
 
 #define SCALE(v1,v1_max,v2_max) \

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-15 12:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-10  3:00 [PATCH]O20.1int Con Kolivas
2003-09-10  4:31 ` [PATCH]O20.1int Andrew Morton
2003-09-10 16:36 ` [PATCH]O20.1int Cliff White
2003-09-15 12:48 ` [PATCH]O20.1int Måns Rullgård

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.