[Linux-hls-cvs] hls/patches gensched2-2.4.25.patch,1.1,1.2
Status: Pre-Alpha
Brought to you by:
lucabe
|
From: Luca A. <lu...@us...> - 2004-07-18 18:39:43
|
Update of /cvsroot/linux-hls/hls/patches In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2678/patches Modified Files: gensched2-2.4.25.patch Log Message: - Committed the new version of the gensched patch (I erroneously committed a wrong patch) - Port the hls module to the new gensched interface (setscheduler and getscheduler changed) - Some fixes... Index: gensched2-2.4.25.patch =================================================================== RCS file: /cvsroot/linux-hls/hls/patches/gensched2-2.4.25.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gensched2-2.4.25.patch 18 Jul 2004 10:40:42 -0000 1.1 --- gensched2-2.4.25.patch 18 Jul 2004 18:39:31 -0000 1.2 *************** *** 1,5 **** ! diff -ur ../linux-2.4.25/Makefile linux-2.4.25/Makefile --- ../linux-2.4.25/Makefile 2004-03-07 09:07:35.000000000 +0100 ! +++ linux-2.4.25/Makefile 2004-06-20 15:58:40.000000000 +0200 @@ -1,7 +1,7 @@ VERSION = 2 --- 1,5 ---- ! diff -urp ../linux-2.4.25/Makefile linux-2.4.25/Makefile --- ../linux-2.4.25/Makefile 2004-03-07 09:07:35.000000000 +0100 ! +++ linux-2.4.25/Makefile 2004-07-18 20:25:11.000000000 +0200 @@ -1,7 +1,7 @@ VERSION = 2 *************** *** 7,18 **** SUBLEVEL = 25 -EXTRAVERSION = ! + EXTRAVERSION = -gensched KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) ! diff -ur ../linux-2.4.25/arch/i386/config.in linux-2.4.25/arch/i386/config.in --- ../linux-2.4.25/arch/i386/config.in 2004-03-07 09:08:19.000000000 +0100 ! +++ linux-2.4.25/arch/i386/config.in 2004-06-20 15:58:40.000000000 +0200 ! @@ -261,6 +261,8 @@ if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then define_bool CONFIG_HAVE_DEC_LOCK y --- 7,18 ---- SUBLEVEL = 25 -EXTRAVERSION = ! +EXTRAVERSION = -gensched KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) ! diff -urp ../linux-2.4.25/arch/i386/config.in linux-2.4.25/arch/i386/config.in --- ../linux-2.4.25/arch/i386/config.in 2004-03-07 09:08:19.000000000 +0100 ! +++ linux-2.4.25/arch/i386/config.in 2004-07-18 13:34:01.000000000 +0200 ! @@ -261,6 +261,8 @@ fi if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then define_bool CONFIG_HAVE_DEC_LOCK y *************** *** 23,30 **** mainmenu_option next_comment ! diff -ur ../linux-2.4.25/arch/ppc/config.in linux-2.4.25/arch/ppc/config.in --- ../linux-2.4.25/arch/ppc/config.in 2004-03-07 09:08:24.000000000 +0100 ! +++ linux-2.4.25/arch/ppc/config.in 2004-06-20 15:59:35.000000000 +0200 ! @@ -265,6 +265,9 @@ if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then define_bool CONFIG_EMBEDDEDBOOT y --- 23,30 ---- mainmenu_option next_comment ! diff -urp ../linux-2.4.25/arch/ppc/config.in linux-2.4.25/arch/ppc/config.in --- ../linux-2.4.25/arch/ppc/config.in 2004-03-07 09:08:24.000000000 +0100 ! +++ linux-2.4.25/arch/ppc/config.in 2004-07-18 13:34:01.000000000 +0200 ! @@ -265,6 +265,9 @@ fi if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then define_bool CONFIG_EMBEDDEDBOOT y *************** *** 36,43 **** mainmenu_option next_comment ! diff -ur ../linux-2.4.25/include/linux/sched.h linux-2.4.25/include/linux/sched.h --- ../linux-2.4.25/include/linux/sched.h 2004-03-07 09:07:41.000000000 +0100 ! +++ linux-2.4.25/include/linux/sched.h 2004-06-20 18:03:49.000000000 +0200 ! @@ -415,6 +415,9 @@ /* journalling filesystem info */ --- 36,43 ---- mainmenu_option next_comment ! diff -urp ../linux-2.4.25/include/linux/sched.h linux-2.4.25/include/linux/sched.h --- ../linux-2.4.25/include/linux/sched.h 2004-03-07 09:07:41.000000000 +0100 ! +++ linux-2.4.25/include/linux/sched.h 2004-07-18 13:38:23.000000000 +0200 ! @@ -415,6 +415,9 @@ struct task_struct { /* journalling filesystem info */ *************** *** 49,53 **** /* ! @@ -469,6 +472,12 @@ * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) --- 49,53 ---- /* ! @@ -469,6 +472,12 @@ extern struct exec_domain default_exec_d * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) *************** *** 62,66 **** { \ state: 0, \ ! @@ -510,6 +519,7 @@ blocked: {{0}}, \ alloc_lock: SPIN_LOCK_UNLOCKED, \ --- 62,66 ---- { \ state: 0, \ ! @@ -510,6 +519,7 @@ extern struct exec_domain default_exec_d blocked: {{0}}, \ alloc_lock: SPIN_LOCK_UNLOCKED, \ *************** *** 70,74 **** ! @@ -806,6 +816,15 @@ extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); --- 70,74 ---- ! @@ -806,6 +816,15 @@ extern void FASTCALL(remove_wait_queue(w extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); *************** *** 86,90 **** do { \ wait_queue_t __wait; \ ! @@ -897,6 +916,11 @@ p->sleep_time = jiffies; list_del(&p->run_list); --- 86,90 ---- do { \ wait_queue_t __wait; \ ! @@ -897,6 +916,11 @@ static inline void del_from_runqueue(str p->sleep_time = jiffies; list_del(&p->run_list); *************** *** 98,104 **** static inline int task_on_runqueue(struct task_struct *p) ! diff -ur ../linux-2.4.25/kernel/exit.c linux-2.4.25/kernel/exit.c --- ../linux-2.4.25/kernel/exit.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/exit.c 2004-06-20 15:58:40.000000000 +0200 @@ -21,6 +21,10 @@ #include <asm/pgtable.h> --- 98,104 ---- static inline int task_on_runqueue(struct task_struct *p) ! diff -urp ../linux-2.4.25/kernel/exit.c linux-2.4.25/kernel/exit.c --- ../linux-2.4.25/kernel/exit.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/exit.c 2004-07-18 13:34:01.000000000 +0200 @@ -21,6 +21,10 @@ #include <asm/pgtable.h> *************** *** 112,116 **** extern struct task_struct *child_reaper; ! @@ -443,6 +447,14 @@ lock_kernel(); --- 112,116 ---- extern struct task_struct *child_reaper; ! @@ -443,6 +447,14 @@ fake_volatile: lock_kernel(); *************** *** 127,133 **** __exit_fs(tsk); exit_namespace(tsk); ! diff -ur ../linux-2.4.25/kernel/fork.c linux-2.4.25/kernel/fork.c --- ../linux-2.4.25/kernel/fork.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/fork.c 2004-06-20 15:58:40.000000000 +0200 @@ -29,6 +29,10 @@ #include <asm/mmu_context.h> --- 127,133 ---- __exit_fs(tsk); exit_namespace(tsk); ! diff -urp ../linux-2.4.25/kernel/fork.c linux-2.4.25/kernel/fork.c --- ../linux-2.4.25/kernel/fork.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/fork.c 2004-07-18 13:34:01.000000000 +0200 @@ -29,6 +29,10 @@ #include <asm/mmu_context.h> *************** *** 141,145 **** int nr_threads; int nr_running; ! @@ -779,6 +783,13 @@ if (!current->counter) current->need_resched = 1; --- 141,145 ---- int nr_threads; int nr_running; ! @@ -779,6 +783,13 @@ int do_fork(unsigned long clone_flags, u if (!current->counter) current->need_resched = 1; *************** *** 155,162 **** * Ok, add it to the run-queues and make it * visible to the rest of the system. ! diff -ur ../linux-2.4.25/kernel/ksyms.c linux-2.4.25/kernel/ksyms.c --- ../linux-2.4.25/kernel/ksyms.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/ksyms.c 2004-06-20 15:58:40.000000000 +0200 ! @@ -619,6 +619,17 @@ /* debug */ EXPORT_SYMBOL(dump_stack); --- 155,162 ---- * Ok, add it to the run-queues and make it * visible to the rest of the system. ! diff -urp ../linux-2.4.25/kernel/ksyms.c linux-2.4.25/kernel/ksyms.c --- ../linux-2.4.25/kernel/ksyms.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/ksyms.c 2004-07-18 13:34:01.000000000 +0200 ! @@ -619,6 +619,17 @@ EXPORT_SYMBOL(unshare_files); /* debug */ EXPORT_SYMBOL(dump_stack); *************** *** 176,182 **** extern const char _end[]; EXPORT_SYMBOL(_end); ! diff -ur ../linux-2.4.25/kernel/sched.c linux-2.4.25/kernel/sched.c --- ../linux-2.4.25/kernel/sched.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/sched.c 2004-06-20 18:02:35.000000000 +0200 @@ -33,6 +33,13 @@ #include <asm/uaccess.h> --- 176,182 ---- extern const char _end[]; EXPORT_SYMBOL(_end); ! diff -urp ../linux-2.4.25/kernel/sched.c linux-2.4.25/kernel/sched.c --- ../linux-2.4.25/kernel/sched.c 2004-03-07 09:07:40.000000000 +0100 ! +++ linux-2.4.25/kernel/sched.c 2004-07-18 20:26:35.000000000 +0200 @@ -33,6 +33,13 @@ #include <asm/uaccess.h> *************** *** 193,197 **** extern void tqueue_bh(void); extern void immediate_bh(void); ! @@ -330,6 +337,11 @@ { list_add_tail(&p->run_list, &runqueue_head); --- 193,197 ---- extern void tqueue_bh(void); extern void immediate_bh(void); ! @@ -330,6 +337,11 @@ static inline void add_to_runqueue(struc { list_add_tail(&p->run_list, &runqueue_head); *************** *** 205,209 **** static inline void move_last_runqueue(struct task_struct * p) ! @@ -961,6 +973,16 @@ if (!p) goto out_unlock; --- 205,209 ---- static inline void move_last_runqueue(struct task_struct * p) ! @@ -961,6 +973,19 @@ static int setscheduler(pid_t pid, int p if (!p) goto out_unlock; *************** *** 213,218 **** + int res; + ! + res = setsched_hook(p, -1, param); + if (res <= 0) { + return res; + } --- 213,221 ---- + int res; + ! + res = setsched_hook(p, policy, param); + if (res <= 0) { + + spin_unlock(&runqueue_lock); + + read_unlock_irq(&tasklist_lock); + + + return res; + } *************** *** 222,226 **** policy = p->policy; else { ! @@ -1048,6 +1070,16 @@ retval = -ESRCH; if (!p) --- 225,229 ---- policy = p->policy; else { ! @@ -1048,6 +1073,16 @@ asmlinkage long sys_sched_getparam(pid_t retval = -ESRCH; if (!p) |