diff -urN oldtree/kernel/sched_staircase.c newtree/kernel/sched_staircase.c --- oldtree/kernel/sched_staircase.c 2006-09-26 14:34:25.000000000 -0400 +++ newtree/kernel/sched_staircase.c 2006-09-26 15:01:24.000000000 -0400 @@ -47,6 +47,7 @@ #include #include +#include /* * sched_interactive - sysctl which allows interactive tasks to have bonus @@ -56,9 +57,43 @@ * sched_iso_cpu - sysctl which determines the cpu percentage SCHED_ISO tasks * are allowed to run (over ISO_PERIOD seconds) as real time tasks. */ + +/* Staircase Kconfig */ +#ifdef CONFIG_STAIRCASE_SERVER +int sched_interactive __read_mostly = 0; +int sched_compute __read_mostly; +int sched_iso_cpu __read_mostly = 0; +#endif +#ifdef CONFIG_STAIRCASE_FILE_SERVER +int sched_interactive __read_mostly = 0; +int sched_compute __read_mostly; +int sched_iso_cpu __read_mostly = 0; +#endif +#ifdef CONFIG_STAIRCASE_COMPUTE_SERVER +int sched_interactive __read_mostly = 0; +int sched_compute __read_mostly = 1; +int sched_iso_cpu __read_mostly = 0; +#endif +#ifdef CONFIG_STAIRCASE_GAMING +int sched_interactive __read_mostly = 0; +int sched_compute __read_mostly = 1; +int sched_iso_cpu __read_mostly = 0; +#endif +#ifdef CONFIG_STAIRCASE_DESKTOP int sched_interactive __read_mostly = 1; int sched_compute __read_mostly; int sched_iso_cpu __read_mostly = 80; +#endif +#ifdef CONFIG_STAIRCASE_LL_DESKTOP +int sched_interactive __read_mostly = 1; +int sched_compute __read_mostly; +int sched_iso_cpu __read_mostly = 80; +#endif +#ifdef CONFIG_STAIRCASE_CUSTOM +int sched_interactive __read_mostly = CONFIG_SCHED_INTERACTIVE_SETTING; +int sched_compute __read_mostly = CONFIG_SCHED_COMPUTE_SETTING; +int sched_iso_cpu __read_mostly = CONFIG_SCHED_ISO_CPU_SETTING; +#endif #define ISO_PERIOD (5 * HZ) /* @@ -99,9 +134,40 @@ * This is the time all tasks within the same priority round robin. * Set to a minimum of 6ms. It is 10 times longer in compute mode. */ -#define _RR_INTERVAL ((6 * HZ / 1001) + 1) + +/* Staircase Tunables */ +#ifdef CONFIG_STAIRCASE_SERVER +int staircase_rr_slice = 6; +int staircase_rr_factor = 19; +#endif +#ifdef CONFIG_STAIRCASE_FILE_SERVER +int staircase_rr_slice = 6; +int staircase_rr_factor = 19; +#endif +#ifdef CONFIG_STAIRCASE_COMPUTE_SERVER +int staircase_rr_slice = 6; +int staircase_rr_factor = 19; +#endif +#ifdef CONFIG_STAIRCASE_GAMING +int staircase_rr_slice = 6; +int staircase_rr_factor = 19; +#endif +#ifdef CONFIG_STAIRCASE_DESKTOP +int staircase_rr_slice = 6; +int staircase_rr_factor = 19; +#endif +#ifdef CONFIG_STAIRCASE_LL_DESKTOP +int staircase_rr_slice = 3; +int staircase_rr_factor = 11; +#endif +#ifdef CONFIG_STAIRCASE_CUSTOM +int staircase_rr_slice = CONFIG_STAIRCASE_RR_SLICE; +int staircase_rr_factor = CONFIG_STAIRCASE_RR_FACTOR; +#endif + +#define _RR_INTERVAL ((staircase_rr_slice * HZ / 1001) + 1) #define RR_INTERVAL (_RR_INTERVAL * (1 + 9 * sched_compute)) -#define DEF_TIMESLICE (RR_INTERVAL * 19) +#define DEF_TIMESLICE (RR_INTERVAL * staircase_rr_factor) /* diff -urN oldtree/kernel/sysctl.c newtree/kernel/sysctl.c --- oldtree/kernel/sysctl.c 2006-09-24 19:25:46.000000000 -0400 +++ newtree/kernel/sysctl.c 2006-09-26 15:03:11.000000000 -0400 @@ -74,6 +74,15 @@ extern int percpu_pagelist_fraction; extern int compat_log; extern int print_fatal_signals; +#ifdef CONFIG_STAIRCASE +/* STAIRCASE Tunables */ +extern int staircase_rr_slice; +extern int staircase_rr_factor; +static int _s_minslice = 2; +static int _s_maxslice = 50; +static int _s_minfactor = 2; +static int _s_maxfactor = 50; +#endif #if defined(CONFIG_ADAPTIVE_READAHEAD) extern int readahead_ratio; @@ -748,6 +757,30 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, +#ifdef CONFIG_STAIRCASE + { + .ctl_name = KERN_STRCS_RR_SLICE, + .procname = "staircase_rr_slice", + .data = &staircase_rr_slice, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &_s_minslice, + .extra2 = &_s_maxslice, + }, + { + .ctl_name = KERN_STRCS_RR_FACTOR, + .procname = "staircase_rr_factor", + .data = &staircase_rr_factor, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &_s_minfactor, + .extra2 = &_s_maxfactor, + }, +#endif { .ctl_name = KERN_BOOTLOADER_TYPE, .procname = "bootloader_type", diff -urN oldtree/mm/filemap.c newtree/mm/filemap.c --- oldtree/mm/filemap.c 2006-09-24 17:03:56.000000000 -0400 +++ newtree/mm/filemap.c 2006-09-26 15:04:12.000000000 -0400 @@ -32,6 +32,7 @@ #include #include "filemap.h" #include "internal.h" +#include /* * FIXME: remove all knowledge of the buffer layer from the core VM Files oldtree/scripts/kconfig/mconf and newtree/scripts/kconfig/mconf differ