v2.6.23-rc1-rt6-dw1
Subsystems (2)
I've released another version of the real-time tree. It's just a slightly more bisectable tree, and it includes the fixes I've just released.
You can download a combined patch from,
ftp://source.mvista.com/pub/dwalker/rt/patch-2.6.23-rc1-rt6-dw1
Or a broken out set from,
ftp://source.mvista.com/pub/dwalker/rt/patch-2.6.23-rc1-rt6-dw1.tar.gz
Below I've included a per patch delta (as good as interdiff can make). In the hopes that it will help integration. The changes are additions to preempt-realtime-sched.patch which are extracted from patches later in the series. This allow preempt-realtime-sched.patch to compile standalone .. There was also a stray hunk in the version.patch which I moved to another location.
:: start series ::
series renamed from patches/series +9 -0
@@ -670,3 +670,12 @@ schedule_on_each_cpu-enhance.patch schedule_on_each_cpu-enhance-rt.patch version.patch +add-warn-on-rcu-read-unlock-imbalance.patch +preempt-hardirqs-selects-preempt-softirqs.patch +initialize-last_tick-in-calc_load.patch +softirq-raise-wakeup-fix.patch +preempt-realtime-net-mismerge.patch +locking-cleanup.patch +pickop-rt_lock_h.patch +pickop-spinlock-rwlocks.patch +pickop-seqlocks.patch
:: end series ::
:: start preempt-realtime-i386.patch ::
include/linux/smp.h +11 -0
@@ -33,6 +33,16 @@ extern void smp_send_stop(void);*/ extern void smp_send_reschedule (int cpu); +/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); + +/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); +/* * Prepare machine for booting other CPUs.
@@ -97,6 +107,7 @@ static inline int up_smp_call_function(v0 ; \ })static inline void smp_send_reschedule (int cpu) { } +static inline void smp_send_reschedule_allbutself (void ) { }#define num_booting_cpus () 1#define smp_prepare_boot_cpu () do {} while (0)#define smp_call_function_single (cpuid, func, info, retry, wait) \
:: end preempt-realtime-i386.patch ::
:: start preempt-realtime-sched.patch ::
include/linux/kernel.h +2 -1
@@ -88,7 +88,7 @@ extern int cond_resched(void);# define might_resched () do { } while (0)#endif -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP +#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP ) || defined(CONFIG_DEBUG_PREEMPT )void __might_sleep (char *file,int line);# define might_sleep () \ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
@@ -198,6 +198,7 @@ extern void add_taint(unsigned);/* Values used for system_state */ extern enum system_states { SYSTEM_BOOTING, + SYSTEM_BOOTING_SCHEDULER_OK, SYSTEM_RUNNING, SYSTEM_HALT, SYSTEM_POWER_OFF,
init/main.c +2 -0
@@ -438,6 +438,8 @@ static void noinline __init_refok rest_i {int pid; + system_state =SYSTEM_BOOTING_SCHEDULER_OK ; +kernel_thread (kernel_init,NULL ,CLONE_FS |CLONE_SIGHAND );numa_default_policy (); pid =kernel_thread (kthreadd,NULL ,CLONE_FS |CLONE_FILES );
lib/kernel_lock.c +18 -9
@@ -35,22 +35,25 @@ DECLARE_MUTEX(kernel_sem);* about recursion, both due to the down() and due to the enabling of * preemption. schedule() will re-check the preemption flag after * reacquiring the semaphore. +* +* Called with interrupts disabled. */ int __lockfunc __reacquire_kernel_lock(void) {struct task_struct *task = current;int saved_lock_depth = task->lock_depth; +local_irq_enable ();BUG_ON (saved_lock_depth <0 ); task->lock_depth =-1 ; -__preempt_enable_no_resched ();down (&kernel_sem); -preempt_disable (); task->lock_depth = saved_lock_depth; +local_irq_disable (); +return 0 ; }
@@ -67,11 +70,15 @@ void __lockfunc lock_kernel(void)struct task_struct *task = current;int depth = task->lock_depth +1 ; -if (likely (!depth)) +if (likely (!depth)) {/* * No recursion worries - we set up lock_depth _after_ */ down (&kernel_sem); +#ifdef CONFIG_DEBUG_RT_MUTEXES + current->last_kernel_lock =__builtin_return_address (0 ); +#endif + } task->lock_depth = depth; }
@@ -82,8 +89,12 @@ void __lockfunc unlock_kernel(void)BUG_ON (task->lock_depth <0 ); -if (likely (--task->lock_depth <0 )) +if (likely (--task->lock_depth ==-1 )) { +#ifdef CONFIG_DEBUG_RT_MUTEXES + current->last_kernel_lock =NULL ; +#endif up (&kernel_sem); + } }#else
@@ -116,11 +127,9 @@ static __cacheline_aligned_in_smp DEFIN*/ int __lockfunc __reacquire_kernel_lock(void) { -while (!_raw_spin_trylock (&kernel_flag)) { -if (test_thread_flag (TIF_NEED_RESCHED )) -return -EAGAIN ; -cpu_relax (); - } +local_irq_enable (); +_raw_spin_lock (&kernel_flag); +local_irq_disable ();preempt_disable ();return 0 ; }
:: end preempt-realtime-sched.patch ::
:: start preempt-realtime-core.patch ::
include/linux/kernel.h +1 -2
@@ -88,7 +88,7 @@# define might_resched () do { } while (0)#endif -#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP ) || defined(CONFIG_DEBUG_PREEMPT ) +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep (char *file,int line);# define might_sleep () \ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
@@ -210,7 +210,6 @@/* Values used for system_state */ extern enum system_states { SYSTEM_BOOTING, - SYSTEM_BOOTING_SCHEDULER_OK, SYSTEM_RUNNING, SYSTEM_HALT, SYSTEM_POWER_OFF,
reverted:
include/linux/smp.h +0 -11
@@ -33,16 +33,6 @@*/ extern void smp_send_reschedule (int cpu); -/* -* trigger a reschedule on all other CPUs: -*/ -extern void smp_send_reschedule_allbutself (void ); - -/* -* trigger a reschedule on all other CPUs: -*/ -extern void smp_send_reschedule_allbutself (void ); -/* * Prepare machine for booting other CPUs.
@@ -107,7 +97,6 @@0 ; \ })static inline void smp_send_reschedule (int cpu) { } -static inline void smp_send_reschedule_allbutself (void ) { }#define num_booting_cpus () 1#define smp_prepare_boot_cpu () do {} while (0)#define smp_call_function_single (cpuid, func, info, retry, wait) \
reverted:
lib/kernel_lock.c +9 -18
@@ -35,25 +35,22 @@* about recursion, both due to the down() and due to the enabling of * preemption. schedule() will re-check the preemption flag after * reacquiring the semaphore. -* -* Called with interrupts disabled. */ int __lockfunc __reacquire_kernel_lock(void) {struct task_struct *task = current;int saved_lock_depth = task->lock_depth; -local_irq_enable ();BUG_ON (saved_lock_depth <0 ); task->lock_depth =-1 ; +__preempt_enable_no_resched ();down (&kernel_sem); +preempt_disable (); task->lock_depth = saved_lock_depth; -local_irq_disable (); -return 0 ; }
@@ -70,15 +67,11 @@struct task_struct *task = current;int depth = task->lock_depth +1 ; +if (likely (!depth)) -if (likely (!depth)) {/* * No recursion worries - we set up lock_depth _after_ */ down (&kernel_sem); -#ifdef CONFIG_DEBUG_RT_MUTEXES - current->last_kernel_lock =__builtin_return_address (0 ); -#endif - } task->lock_depth = depth; }
@@ -89,12 +82,8 @@BUG_ON (task->lock_depth <0 ); +if (likely (--task->lock_depth <0 )) -if (likely (--task->lock_depth ==-1 )) { -#ifdef CONFIG_DEBUG_RT_MUTEXES - current->last_kernel_lock =NULL ; -#endif up(&kernel_sem); - } }#else
@@ -127,9 +116,11 @@*/ int __lockfunc __reacquire_kernel_lock(void) { +while (!_raw_spin_trylock (&kernel_flag)) { +if (test_thread_flag (TIF_NEED_RESCHED )) +return -EAGAIN ; +cpu_relax (); + } -local_irq_enable (); -_raw_spin_lock (&kernel_flag); -local_irq_disable ();preempt_disable ();return 0 ; }
:: end preempt-realtime-core.patch ::
:: start preempt-realtime-init-show-enabled-debugs.patch ::
init/main.c +0 -2
@@ -438,8 +438,6 @@ {int pid; - system_state =SYSTEM_BOOTING_SCHEDULER_OK ; -kernel_thread (kernel_init,NULL ,CLONE_FS |CLONE_SIGHAND );numa_default_policy (); pid =kernel_thread (kthreadd,NULL ,CLONE_FS |CLONE_FILES );
:: end preempt-realtime-init-show-enabled-debugs.patch ::
:: start schedule_on_each_cpu-enhance.patch ::
kernel/workqueue.c +1 -0
@@ -647,6 +647,7 @@return err; } +EXPORT_SYMBOL (schedule_on_each_cpu);/** * schedule_on_each_cpu_wq - call a function on each online CPU on a per-CPU wq
:: end schedule_on_each_cpu-enhance.patch ::
:: start version.patch ::
reverted:
kernel/workqueue.c +0 -1
@@ -647,7 +647,6 @@return err; } -EXPORT_SYMBOL (schedule_on_each_cpu);/** * schedule_on_each_cpu_wq - call a function on each online CPU on a per-CPU wq
:: end version.patch ::
Quoted 305 lines
include/linux/smp.h +11
-0+/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); + +/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); +/* * Prepare machine for booting other CPUs. @@ -97,6 +107,7 @@ static inline int up_smp_call_function(v0 ; \ })static inline void smp_send_reschedule (int cpu) { } +static inline void smp_send_reschedule_allbutself (void ) { }#define num_booting_cpus () 1#define smp_prepare_boot_cpu () do {} while (0)#define smp_call_function_single (cpuid, func, info, retry, wait) \:: end preempt-realtime-i386.patch ::
:: start preempt-realtime-sched.patch ::include/linux/kernel.h +2
-1@@ -88,7 +88,7 @@ extern int cond_resched(void);# define might_resched () do { } while (0)#endif -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP +#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP ) || defined(CONFIG_DEBUG_PREEMPT )void __might_sleep (char *file,int line);# define might_sleep () \ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)@@ -198,6 +198,7 @@ extern void add_taint(unsigned);/* Values used for system_state */ extern enum system_states { SYSTEM_BOOTING, + SYSTEM_BOOTING_SCHEDULER_OK, SYSTEM_RUNNING, SYSTEM_HALT, SYSTEM_POWER_OFF,init/main.c +2
-0@@ -438,6 +438,8 @@ static void noinline __init_refok rest_i {int pid; + system_state =SYSTEM_BOOTING_SCHEDULER_OK ; +kernel_thread (kernel_init,NULL ,CLONE_FS |CLONE_SIGHAND );numa_default_policy (); pid =kernel_thread (kthreadd,NULL ,CLONE_FS |CLONE_FILES );lib/kernel_lock.c +18
-9@@ -35,22 +35,25 @@ DECLARE_MUTEX(kernel_sem);* about recursion, both due to the down() and due to the enabling of * preemption. schedule() will re-check the preemption flag after * reacquiring the semaphore. +* +* Called with interrupts disabled. */ int __lockfunc __reacquire_kernel_lock(void) {struct task_struct *task = current;int saved_lock_depth = task->lock_depth; +local_irq_enable ();BUG_ON (saved_lock_depth <0 ); task->lock_depth =-1 ; -__preempt_enable_no_resched ();down (&kernel_sem); -preempt_disable (); task->lock_depth = saved_lock_depth; +local_irq_disable (); +return 0 ; }@@ -67,11 +70,15 @@ void __lockfunc lock_kernel(void)struct task_struct *task = current;int depth = task->lock_depth +1 ; -if (likely (!depth)) +if (likely (!depth)) {/* * No recursion worries - we set up lock_depth _after_ */ down (&kernel_sem); +#ifdef CONFIG_DEBUG_RT_MUTEXES + current->last_kernel_lock =__builtin_return_address (0 ); +#endif + } task->lock_depth = depth; }@@ -82,8 +89,12 @@ void __lockfunc unlock_kernel(void)BUG_ON (task->lock_depth <0 ); -if (likely (--task->lock_depth <0 )) +if (likely (--task->lock_depth ==-1 )) { +#ifdef CONFIG_DEBUG_RT_MUTEXES + current->last_kernel_lock =NULL ; +#endif up (&kernel_sem); + } }#else @@ -116,11 +127,9 @@ static __cacheline_aligned_in_smp DEFIN*/ int __lockfunc __reacquire_kernel_lock(void) { -while (!_raw_spin_trylock (&kernel_flag)) { -if (test_thread_flag (TIF_NEED_RESCHED )) -return -EAGAIN ; -cpu_relax (); - } +local_irq_enable (); +_raw_spin_lock (&kernel_flag); +local_irq_disable ();preempt_disable ();return 0 ; }:: end preempt-realtime-sched.patch ::
:: start preempt-realtime-core.patch ::
diff -ulinux-rt-rebase.q/include/linux/kernel.hlinux-2.6.22/include/linux/kernel.hinclude/linux/kernel.h +1
-2@@ -88,7 +88,7 @@# define might_resched () do { } while (0)#endif -#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP ) || defined(CONFIG_DEBUG_PREEMPT ) +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep (char *file,int line);# define might_sleep () \ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)@@ -210,7 +210,6 @@/* Values used for system_state */ extern enum system_states { SYSTEM_BOOTING, - SYSTEM_BOOTING_SCHEDULER_OK, SYSTEM_RUNNING, SYSTEM_HALT, SYSTEM_POWER_OFF,reverted:
include/linux/smp.h +0
-11@@ -33,16 +33,6 @@*/ extern void smp_send_reschedule (int cpu); -/* -* trigger a reschedule on all other CPUs: -*/ -extern void smp_send_reschedule_allbutself (void ); - -/* -* trigger a reschedule on all other CPUs: -*/ -extern void smp_send_reschedule_allbutself (void ); -/* * Prepare machine for booting other CPUs. @@ -107,7 +97,6 @@0 ; \ })static inline void smp_send_reschedule (int cpu) { } -static inline void smp_send_reschedule_allbutself (void ) { }#define num_booting_cpus () 1#define smp_prepare_boot_cpu () do {} while (0)#define smp_call_function_single (cpuid, func, info, retry, wait) \reverted:
lib/kernel_lock.c +9
-18@@ -35,25 +35,22 @@* about recursion, both due to the down() and due to the enabling of * preemption. schedule() will re-check the preemption flag after * reacquiring the semaphore. -* -* Called with interrupts disabled. */ int __lockfunc __reacquire_kernel_lock(void) {struct task_struct *task = current;int saved_lock_depth = task->lock_depth; -local_irq_enable ();BUG_ON (saved_lock_depth <0 ); task->lock_depth =-1 ; +__preempt_enable_no_resched ();down (&kernel_sem); +preempt_disable (); task->lock_depth = saved_lock_depth; -local_irq_disable (); -return 0 ; }@@ -70,15 +67,11 @@struct task_struct *task = current;int depth = task->lock_depth +1 ; +if (likely (!depth)) -if (likely (!depth)) {/* * No recursion worries - we set up lock_depth _after_ */ down (&kernel_sem); -#ifdef CONFIG_DEBUG_RT_MUTEXES - current->last_kernel_lock =__builtin_return_address (0 ); -#endif - } task->lock_depth = depth; }@@ -89,12 +82,8 @@BUG_ON (task->lock_depth <0 ); +if (likely (--task->lock_depth <0 )) -if (likely (--task->lock_depth ==-1 )) { -#ifdef CONFIG_DEBUG_RT_MUTEXES - current->last_kernel_lock =NULL ; -#endif up(&kernel_sem); - } }#else @@ -127,9 +116,11 @@*/ int __lockfunc __reacquire_kernel_lock(void) { +while (!_raw_spin_trylock (&kernel_flag)) { +if (test_thread_flag (TIF_NEED_RESCHED )) +return -EAGAIN ; +cpu_relax (); + } -local_irq_enable (); -_raw_spin_lock (&kernel_flag); -local_irq_disable ();preempt_disable ();return 0 ; }:: end preempt-realtime-core.patch ::
:: start preempt-realtime-init-show-enabled-debugs.patch ::
diff -ulinux-rt-rebase.q/init/main.clinux-2.6.22/init/main.cinit/main.c +0
-2@@ -438,8 +438,6 @@ {int pid; - system_state =SYSTEM_BOOTING_SCHEDULER_OK ; -kernel_thread (kernel_init,NULL ,CLONE_FS |CLONE_SIGHAND );numa_default_policy (); pid =kernel_thread (kthreadd,NULL ,CLONE_FS |CLONE_FILES );:: end preempt-realtime-init-show-enabled-debugs.patch ::
:: start schedule_on_each_cpu-enhance.patch ::
diff -ulinux-rt-rebase.q/kernel/workqueue.clinux-2.6.22/kernel/workqueue.ckernel/workqueue.c +1
-0@@ -647,6 +647,7 @@return err; } +EXPORT_SYMBOL (schedule_on_each_cpu);/** * schedule_on_each_cpu_wq - call a function on each online CPU on a per-CPU wq :: end schedule_on_each_cpu-enhance.patch ::
:: start version.patch ::
reverted:kernel/workqueue.c +0
-1@@ -647,7 +647,6 @@return err; } -EXPORT_SYMBOL (schedule_on_each_cpu);/** * schedule_on_each_cpu_wq - call a function on each online CPU on a per-CPU wq :: end version.patch ::
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
include/linux/smp.h extern void smp_send_stop(void); · line 45
Quoted 11 lines
include/linux/smp.h +10
-0+/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); + +/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); +
just to make sure the C compiler doesn't forget it ? or maybe the parser is suffering from memory lapse ? ;)
include/linux/kernel.h extern int cond_resched(void); · line 91
Quoted 3 lines
include/linux/kernel.h +1
-1-#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP +#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP ) || defined(CONFIG_DEBUG_PREEMPT )
why this change? the change is for spinlock debugging.. why add preempt to this?
include/linux/kernel.h extern void add_taint(unsigned); · line 201
Quoted 8 lines
void __might_sleep(char *file, int line); # define might_sleep() \include/linux/kernel.h +1
-0do {__might_sleep (__FILE__, __LINE__);might_resched (); }while (0 )@@ -198,6 +198,7 @@ extern void add_taint(unsigned);/* Values used for system_state */ extern enum system_states { SYSTEM_BOOTING, + SYSTEM_BOOTING_SCHEDULER_OK,
what is this used for? your patch doesn't add users of this...
Quoted 19 lines
include/linux/kernel.h +0
-0SYSTEM_RUNNING ,SYSTEM_HALT , SYSTEM_POWER_OFF,init/main.c +2
-0@@ -438,6 +438,8 @@ static void noinline __init_refok rest_i {int pid; + system_state =SYSTEM_BOOTING_SCHEDULER_OK ; +kernel_thread (kernel_init,NULL ,CLONE_FS |CLONE_SIGHAND );numa_default_policy (); pid =kernel_thread (kthreadd,NULL ,CLONE_FS |CLONE_FILES );lib/kernel_lock.c +0
-0@@ -35,22 +35,25 @@ DECLARE_MUTEX(kernel_sem);* about recursion, both due to the down() and due to the enabling of * preemption. schedule() will re-check the preemption flag after
lib/kernel_lock.c DECLARE_MUTEX(kernel_sem); · line 46
Quoted 10 lines
lib/kernel_lock.c +3
-0* reacquiring the semaphore. +* +* Called with interrupts disabled. */ int __lockfunc __reacquire_kernel_lock(void) {struct task_struct *task = current;int saved_lock_depth = task->lock_depth; +local_irq_enable ();
eh... if interrupts are off here that's a bad bug. Why work around it?
lib/kernel_lock.c DECLARE_MUTEX(kernel_sem); · line 56
Quoted 12 lines
lib/kernel_lock.c +2
-2BUG_ON (saved_lock_depth <0 ); task->lock_depth =-1 ; -__preempt_enable_no_resched ();down (&kernel_sem); -preempt_disable (); task->lock_depth = saved_lock_depth; +local_irq_disable (); +
same here..
lib/kernel_lock.c static __cacheline_aligned_in_smp DEFIN · line 132
Quoted 10 lines
lib/kernel_lock.c +3
-5int __lockfunc __reacquire_kernel_lock(void) { -while (!_raw_spin_trylock (&kernel_flag)) { -if (test_thread_flag (TIF_NEED_RESCHED )) -return -EAGAIN ; -cpu_relax (); - } +local_irq_enable (); +_raw_spin_lock (&kernel_flag); +local_irq_disable ();
are you sure you want this semantics change?
Quoted 14 lines · Arjan van de Ven
include/linux/smp.h extern void smp_send_stop(void); · line 45
Quoted 11 lines
include/linux/smp.h +10
-0+/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); + +/* +* trigger a reschedule on all other CPUs: +*/ +extern void smp_send_reschedule_allbutself (void ); +just to make sure the C compiler doesn't forget it ? or maybe the parser is suffering from memory lapse ? ;)
In terms of this whole patch, I should have been a little clearer about it's meaning .. It represents code getting moved inside the -rt series.. For example the code above was originally in the, preempt-realtime-core.patch and I moved it to the preempt-realtime-i386.patch.
So I'm not actually adding any code.. I wasn't trying to put Ingo's code up for evaluation either, since it's all still in development ..
Daniel