2.6.17-smpnice-staircase-16
Subsystems (2)
PATCH 3/29 2.6.17-smpnice-staircase-16
Implement the "staircase" hybrid foreground-background single priority array cpu scheduler policy.
Signed-off-by Con Kolivas <[email protected]>
fs/proc/array.c | 4 include/linux/sched.h | 21 - kernel/exit.c | 1 kernel/sched.c | 1015 ++++++++++++++++++-------------------------------- 4 files changed, 378 insertions(+), 663 deletions(-)
fs/proc/array.c +2 -2
@@ -165,7 +165,7 @@ static inline char * task_state(struct tread_lock (&tasklist_lock); buffer +=sprintf (buffer,"State:\t%s\n" -"SleepAVG:\t%lu%%\n" +"Bonus:\t%d\n" "Tgid:\t%d\n" "Pid:\t%d\n" "PPid:\t%d\n"
@@ -173,7 +173,7 @@ static inline char * task_state(struct t"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 ), + p->bonus, p->tgid, p->pid,pid_alive (p) ? p->group_leader->real_parent->tgid :0 , pid_alive(p) && p->ptrace ? p->parent->pid : 0,
include/linux/sched.h +7 -14
@@ -483,6 +483,7 @@ struct signal_struct {#define MAX_RT_PRIO MAX_USER_RT_PRIO#define MAX_PRIO (MAX_RT_PRIO + 40) +#define MIN_USER_PRIO (MAX_PRIO - 1)#define rt_task (p) (unlikely((p)->prio < MAX_RT_PRIO))#define batch_task (p) (unlikely((p)->policy == SCHED_BATCH))
@@ -518,7 +519,6 @@ extern struct user_struct *find_user(uidextern struct user_struct root_user;#define INIT_USER (&root_user) -typedef struct prio_array prio_array_t ;struct backing_dev_info ;struct reclaim_state ;
@@ -687,13 +687,6 @@ struct audit_context; /* See audit.c */struct mempolicy ;struct pipe_inode_info ; -enum sleep_type { -SLEEP_NORMAL , -SLEEP_NONINTERACTIVE , -SLEEP_INTERACTIVE , -SLEEP_INTERRUPTED , -}; -struct task_struct {volatile long state;/* -1 unrunnable, 0 runnable, >0 stopped */ struct thread_info *thread_info;
@@ -711,19 +704,18 @@ struct task_struct {int load_weight;/* for niceness load balancing purposes */ int prio, static_prio;struct list_head run_list; -prio_array_t *array;unsigned short ioprio;unsigned int btrace_seq; -unsigned long sleep_avg; -unsigned long long timestamp, last_ran; +unsigned long long timestamp; +unsigned long runtime, totalrun, ns_debit, systime; +unsigned int bonus; +unsigned int slice, time_slice;unsigned long long sched_time;/* sched_clock time spent running */ -enum sleep_type sleep_type;unsigned long policy;cpumask_t cpus_allowed; -unsigned int time_slice, first_time_slice;#ifdef CONFIG_SCHEDSTATS struct sched_info sched_info;
@@ -952,6 +944,8 @@ static inline void put_task_struct(struc#define PF_SPREAD_PAGE 0x04000000/* Spread page cache over cpuset */ #define PF_SPREAD_SLAB 0x08000000/* Spread some slab caches over cpuset */ #define PF_MEMPOLICY 0x10000000/* Non-default NUMA mempolicy */ +#define PF_NONSLEEP 0x20000000/* Waiting on in kernel activity */ +#define PF_FORKED 0x40000000/* Task just forked another process */ /* * Only the _current_ task can read/write to tsk->flags, but other
@@ -1073,7 +1067,6 @@ extern void FASTCALL(wake_up_new_task(ststatic inline void kick_process (struct task_struct *tsk) { }#endif extern void FASTCALL (sched_fork (task_t * p,int clone_flags)); -extern void FASTCALL (sched_exit (task_t * p));extern int in_group_p (gid_t );extern int in_egroup_p (gid_t );
kernel/exit.c +0 -1
@@ -170,7 +170,6 @@ repeat: zap_leader = (leader->exit_signal ==-1 ); } -sched_exit (p);write_unlock_irq (&tasklist_lock);spin_unlock (&p->proc_lock);proc_pid_flush (proc_dentry);
kernel/sched.c +369 -646
1,539 lines not on this page · raw message
Signature · 1 line
-ck