diff -urN oldtree/fs/proc/array.c newtree/fs/proc/array.c --- oldtree/fs/proc/array.c 2006-09-29 14:03:21.000000000 -0400 +++ newtree/fs/proc/array.c 2006-09-29 14:40:32.000000000 -0400 @@ -165,7 +165,12 @@ read_lock(&tasklist_lock); buffer += sprintf(buffer, "State:\t%s\n" +#ifdef CONFIG_INGOSCHED "SleepAVG:\t%lu%%\n" +#endif +#ifdef CONFIG_STAIRCASE + "Bonus:\t%d\n" +#endif "Tgid:\t%d\n" "Pid:\t%d\n" "PPid:\t%d\n" @@ -173,7 +178,12 @@ "Uid:\t%d\t%d\t%d\t%d\n" "Gid:\t%d\t%d\t%d\t%d\n", get_task_state(p), - (p->sleep_avg/1024)*100/(1020000000/1024), +#ifdef CONFIG_INGOSCHED + (p->sleep_avg/1024)*100/(1020000000/1024), +#endif +#ifdef CONFIG_STAIRCASE + p->bonus, +#endif p->tgid, p->pid, pid_alive(p) ? p->group_leader->real_parent->tgid : 0, pid_alive(p) && p->ptrace ? p->parent->pid : 0, diff -urN oldtree/include/linux/sched.h newtree/include/linux/sched.h --- oldtree/include/linux/sched.h 2006-09-29 14:38:58.000000000 -0400 +++ newtree/include/linux/sched.h 2006-09-29 14:39:14.000000000 -0400 @@ -509,6 +509,9 @@ #define MAX_RT_PRIO MAX_USER_RT_PRIO #define MAX_PRIO (MAX_RT_PRIO + 40) +#ifdef CONFIG_STAIRCASE +#define MIN_USER_PRIO (MAX_PRIO - 1) +#endif #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) #define rt_task(p) rt_prio((p)->prio) @@ -797,6 +800,7 @@ struct mempolicy; struct pipe_inode_info; +#ifdef CONFIG_INGOSCHED enum sleep_type { SLEEP_NORMAL, SLEEP_NONINTERACTIVE, @@ -805,6 +809,7 @@ }; struct prio_array; +#endif struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ @@ -823,20 +828,34 @@ int load_weight; /* for niceness load balancing purposes */ int prio, static_prio, normal_prio; struct list_head run_list; +#ifdef CONFIG_INGOSCHED struct prio_array *array; +#endif unsigned short ioprio; #ifdef CONFIG_BLK_DEV_IO_TRACE unsigned int btrace_seq; #endif +#ifdef CONFIG_INGOSCHED unsigned long sleep_avg; unsigned long long timestamp, last_ran; +#endif +#ifdef CONFIG_STAIRCASE + unsigned long long timestamp; + unsigned long runtime, totalrun, ns_debit, systime; + unsigned int bonus; + unsigned int slice, time_slice; +#endif unsigned long long sched_time; /* sched_clock time spent running */ +#ifdef CONFIG_INGOSCHED enum sleep_type sleep_type; +#endif unsigned long policy; cpumask_t cpus_allowed; +#ifdef CONFIG_INGOSCHED unsigned int time_slice, first_time_slice; +#endif #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) struct sched_info sched_info; @@ -1124,6 +1143,10 @@ #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ +#ifdef CONFIG_STAIRCASE +#define PF_NONSLEEP 0x40000000 /* Waiting on in kernel activity */ +#define PF_FORKED 0x80000000 /* Task just forked another process */ +#endif /* * Only the _current_ task can read/write to tsk->flags, but other @@ -1259,7 +1282,9 @@ static inline void kick_process(struct task_struct *tsk) { } #endif extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags)); +#ifdef CONFIG_INGOSCHED extern void FASTCALL(sched_exit(struct task_struct * p)); +#endif extern int in_group_p(gid_t); extern int in_egroup_p(gid_t); diff -urN oldtree/kernel/exit.c newtree/kernel/exit.c --- oldtree/kernel/exit.c 2006-09-29 14:03:22.000000000 -0400 +++ newtree/kernel/exit.c 2006-09-29 14:39:14.000000000 -0400 @@ -166,7 +166,9 @@ zap_leader = (leader->exit_signal == -1); } +#ifdef CONFIG_INGOSCHED sched_exit(p); +#endif write_unlock_irq(&tasklist_lock); proc_flush_task(p); release_thread(p);