diff -urN oldtree/.links/bookmarks.html newtree/.links/bookmarks.html --- oldtree/.links/bookmarks.html 1969-12-31 19:00:00.000000000 -0500 +++ newtree/.links/bookmarks.html 2006-09-17 06:51:15.000000000 -0400 @@ -0,0 +1,27 @@ + +
+ ++
+ diff -urN oldtree/include/linux/init_task.h newtree/include/linux/init_task.h --- oldtree/include/linux/init_task.h 2006-09-17 06:43:35.000000000 -0400 +++ newtree/include/linux/init_task.h 2006-09-17 06:51:18.000000000 -0400 @@ -91,6 +91,7 @@ * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) */ +#ifdef CONFIG_INGOSCHED #define INIT_TASK(tsk) \ { \ .state = 0, \ @@ -98,16 +99,9 @@ .usage = ATOMIC_INIT(2), \ .flags = 0, \ .lock_depth = -1, \ -#ifdef CONFIG_INGOSCHED \ - .prio = MAX_PRIO-20, \ - .static_prio = MAX_PRIO-20, \ - .normal_prio = MAX_PRIO-20, \ -#endif \ -#ifdef CONFIG_STAIRCASE \ - .prio = MAX_PRIO-21, \ - .static_prio = MAX_PRIO-21, \ - .normal_prio = MAX_PRIO-21, \ -#endif \ + .prio = MAX_PRIO-20, \ + .static_prio = MAX_PRIO-20, \ + .normal_prio = MAX_PRIO-20, \ .policy = SCHED_NORMAL, \ .cpus_allowed = CPU_MASK_ALL, \ .mm = NULL, \ @@ -141,6 +135,7 @@ .signal = {{0}}}, \ .blocked = {{0}}, \ .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ + .mutexes_held = 0, \ .journal_info = NULL, \ .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .fs_excl = ATOMIC_INIT(0), \ @@ -148,7 +143,59 @@ INIT_TRACE_IRQFLAGS \ INIT_LOCKDEP \ } - +#endif +#ifdef CONFIG_STAIRCASE +#define INIT_TASK(tsk) \ +{ \ + .state = 0, \ + .thread_info = &init_thread_info, \ + .usage = ATOMIC_INIT(2), \ + .flags = 0, \ + .lock_depth = -1, \ + .prio = MAX_PRIO-21, \ + .static_prio = MAX_PRIO-21, \ + .normal_prio = MAX_PRIO-21, \ + .policy = SCHED_NORMAL, \ + .cpus_allowed = CPU_MASK_ALL, \ + .mm = NULL, \ + .active_mm = &init_mm, \ + .run_list = LIST_HEAD_INIT(tsk.run_list), \ + .ioprio = 0, \ + .time_slice = HZ, \ + .tasks = LIST_HEAD_INIT(tsk.tasks), \ + .ptrace_children= LIST_HEAD_INIT(tsk.ptrace_children), \ + .ptrace_list = LIST_HEAD_INIT(tsk.ptrace_list), \ + .real_parent = &tsk, \ + .parent = &tsk, \ + .children = LIST_HEAD_INIT(tsk.children), \ + .sibling = LIST_HEAD_INIT(tsk.sibling), \ + .group_leader = &tsk, \ + .group_info = &init_groups, \ + .cap_effective = CAP_INIT_EFF_SET, \ + .cap_inheritable = CAP_INIT_INH_SET, \ + .cap_permitted = CAP_FULL_SET, \ + .keep_capabilities = 0, \ + .user = INIT_USER, \ + .comm = "swapper", \ + .thread = INIT_THREAD, \ + .fs = &init_fs, \ + .files = &init_files, \ + .signal = &init_signals, \ + .sighand = &init_sighand, \ + .nsproxy = &init_nsproxy, \ + .pending = { \ + .list = LIST_HEAD_INIT(tsk.pending.list), \ + .signal = {{0}}}, \ + .blocked = {{0}}, \ + .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ + .journal_info = NULL, \ + .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ + .fs_excl = ATOMIC_INIT(0), \ + .pi_lock = SPIN_LOCK_UNLOCKED, \ + INIT_TRACE_IRQFLAGS \ + INIT_LOCKDEP \ +} +#endif #define INIT_CPU_TIMERS(cpu_timers) \ { \ diff -urN oldtree/include/linux/sched.h newtree/include/linux/sched.h --- oldtree/include/linux/sched.h 2006-09-17 06:43:35.000000000 -0400 +++ newtree/include/linux/sched.h 2006-09-17 06:51:18.000000000 -0400 @@ -161,7 +161,12 @@ #define EXIT_DEAD 32 /* in tsk->state again */ #define TASK_NONINTERACTIVE 64 +#ifdef CONFIG_INGOSCHED #define TASK_DEAD 128 +#endif +#ifdef CONFIG_STAIRCASE +#define PF_DEAD 128 +#endif #define __set_task_state(tsk, state_value) \ do { (tsk)->state = (state_value); } while (0) @@ -870,7 +875,9 @@ 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; @@ -1035,6 +1042,7 @@ struct held_lock held_locks[MAX_LOCK_DEPTH]; unsigned int lockdep_recursion; #endif + unsigned long mutexes_held; /* journalling filesystem info */ void *journal_info; diff -urN oldtree/kernel/exit.c newtree/kernel/exit.c --- oldtree/kernel/exit.c 2006-09-17 06:43:35.000000000 -0400 +++ newtree/kernel/exit.c 2006-09-17 06:52:29.000000000 -0400 @@ -962,8 +962,12 @@ preempt_disable(); /* causes final put_task_struct in finish_task_switch(). */ +#ifdef CONFIG_INGOSCHED tsk->state = TASK_DEAD; - +#endif +#ifdef CONFIG_STAIRCASE + tsk->state = PF_DEAD; +#endif schedule(); BUG(); /* Avoid "noreturn function does return". */ diff -urN oldtree/kernel/fork.c newtree/kernel/fork.c --- oldtree/kernel/fork.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree/kernel/fork.c 2006-09-17 06:51:18.000000000 -0400 @@ -1053,6 +1053,7 @@ p->io_context = NULL; p->io_wait = NULL; p->audit_context = NULL; + p->mutexes_held = 0; cpuset_fork(p); #ifdef CONFIG_NUMA p->mempolicy = mpol_copy(p->mempolicy); diff -urN oldtree/kernel/mutex.c newtree/kernel/mutex.c --- oldtree/kernel/mutex.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree/kernel/mutex.c 2006-09-17 06:51:18.000000000 -0400 @@ -60,6 +60,16 @@ static void fastcall noinline __sched __mutex_lock_slowpath(atomic_t *lock_count); +static inline void inc_mutex_count(void) +{ + current->mutexes_held++; +} + +static inline void dec_mutex_count(void) +{ + current->mutexes_held--; +} + /*** * mutex_lock - acquire the mutex * @lock: the mutex to be acquired @@ -89,6 +99,7 @@ * 'unlocked' into 'locked' state. */ __mutex_fastpath_lock(&lock->count, __mutex_lock_slowpath); + inc_mutex_count(); } EXPORT_SYMBOL(mutex_lock); @@ -114,6 +125,7 @@ * into 'unlocked' state: */ __mutex_fastpath_unlock(&lock->count, __mutex_unlock_slowpath); + dec_mutex_count(); } EXPORT_SYMBOL(mutex_unlock); @@ -274,9 +286,14 @@ */ int fastcall __sched mutex_lock_interruptible(struct mutex *lock) { + int ret; + might_sleep(); - return __mutex_fastpath_lock_retval + ret = __mutex_fastpath_lock_retval (&lock->count, __mutex_lock_interruptible_slowpath); + if (likely(!ret)) + inc_mutex_count(); + return ret; } EXPORT_SYMBOL(mutex_lock_interruptible); @@ -331,8 +348,12 @@ */ int fastcall __sched mutex_trylock(struct mutex *lock) { - return __mutex_fastpath_trylock(&lock->count, + int ret = __mutex_fastpath_trylock(&lock->count, __mutex_trylock_slowpath); + + if (likely(ret)) + inc_mutex_count(); + return ret; } EXPORT_SYMBOL(mutex_trylock); Files oldtree/scripts/kconfig/mconf and newtree/scripts/kconfig/mconf differ