diff -urN oldtree/Documentation/sysctl/kernel.txt newtree/Documentation/sysctl/kernel.txt --- oldtree/Documentation/sysctl/kernel.txt 2006-09-29 13:50:42.000000000 -0400 +++ newtree/Documentation/sysctl/kernel.txt 2006-09-29 14:36:28.000000000 -0400 @@ -25,6 +25,7 @@ - domainname - hostname - hotplug +- interactive - java-appletviewer [ binfmt_java, obsolete ] - java-interpreter [ binfmt_java, obsolete ] - l2cr [ PPC only ] @@ -160,6 +161,15 @@ ============================================================== +interactive: (Staircase only) + +This flag controls the allocation of dynamic priorities in the cpu +scheduler. It gives low cpu using tasks high priority for lowest +latencies. Nice value is still observed but stricter cpu proportions +are obeyed if this tunable is disabled. Enabled by default. + +============================================================== + l2cr: (PPC only) This flag controls the L2 cache of G3 processor boards. If diff -urN oldtree/include/linux/sched.h newtree/include/linux/sched.h --- oldtree/include/linux/sched.h 2006-09-29 14:15:25.000000000 -0400 +++ newtree/include/linux/sched.h 2006-09-29 14:36:28.000000000 -0400 @@ -205,6 +205,9 @@ void io_schedule(void); long io_schedule_timeout(long timeout); +#ifdef CONFIG_STAIRCASE +extern int sched_interactive; +#endif extern void cpu_init (void); extern void trap_init(void); diff -urN oldtree/include/linux/sysctl.h newtree/include/linux/sysctl.h --- oldtree/include/linux/sysctl.h 2006-09-29 14:16:42.000000000 -0400 +++ newtree/include/linux/sysctl.h 2006-09-29 14:36:28.000000000 -0400 @@ -152,6 +152,7 @@ KERN_MAX_LOCK_DEPTH=74, KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ + KERN_INTERACTIVE=77, /* interactive tasks can have cpu bursts */ }; diff -urN oldtree/kernel/sched_staircase.c newtree/kernel/sched_staircase.c --- oldtree/kernel/sched_staircase.c 2006-09-29 14:32:34.000000000 -0400 +++ newtree/kernel/sched_staircase.c 2006-09-29 14:36:28.000000000 -0400 @@ -49,6 +49,12 @@ #include /* + * sched_interactive - sysctl which allows interactive tasks to have bonus + * raise its priority. + */ +int sched_interactive __read_mostly = 1; + +/* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], * and back. @@ -855,7 +861,7 @@ best_bonus = bonus(p); prio = MAX_RT_PRIO + best_bonus; - if (!batch_task(p)) + if (sched_interactive && !batch_task(p)) prio -= p->bonus; rr = rr_interval(p); diff -urN oldtree/kernel/sysctl.c newtree/kernel/sysctl.c --- oldtree/kernel/sysctl.c 2006-09-29 14:16:42.000000000 -0400 +++ newtree/kernel/sysctl.c 2006-09-29 14:36:28.000000000 -0400 @@ -626,6 +626,16 @@ .mode = 0444, .proc_handler = &proc_dointvec, }, +#ifdef CONFIG_STAIRCASE + { + .ctl_name = KERN_INTERACTIVE, + .procname = "interactive", + .data = &sched_interactive, + .maxlen = sizeof (int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, +#endif #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) { .ctl_name = KERN_UNKNOWN_NMI_PANIC,