RT: set LPPTEST default to off
PATCH 1/1 RT: set LPPTEST default to off
Set the default to off for the LPP test. Since it's not usually going to be used.
drivers/char/Kconfig +1 -1
@@ -730,7 +730,7 @@ config BLOCKER config LPPTEST tristate "Parallel Port Based Latency Measurement Device" depends on !PARPORT - default y + default n ---help--- If you say Y here then a device will be created that the userspace testlpp utility uses to measure IRQ latencies of a target system
PATCH 1/1 RT: Invert some TRACE_BUG_ON_LOCKED tests
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
kernel/rt.c +7 -7
@@ -736,8 +736,8 @@if (old_owner == new_owner)return ; -TRACE_BUG_ON_LOCKED (!spin_is_locked (&old_owner->task->pi_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&new_owner->task->pi_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&old_owner->task->pi_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&new_owner->task->pi_lock));plist_for_each_safe (curr1, next1, &old_owner->task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);if (w->lock == lock) {
@@ -770,8 +770,8 @@return ; } -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&p->pi_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&p->pi_lock));#ifdef CONFIG_RT_DEADLOCK_DETECT pi_prio++;if (p->policy !=SCHED_NORMAL && prio >normal_prio (p)) {
@@ -967,8 +967,8 @@/* * Add SCHED_NORMAL tasks to the end of the waitqueue (FIFO): */ -TRACE_BUG_ON_LOCKED (!spin_is_locked (&task->pi_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&task->pi_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&lock->wait_lock));#if !ALL_TASKS_PI if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);
@@ -1070,7 +1070,7 @@struct rt_mutex_waiter *waiter =NULL ;struct thread_info *new_owner; -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED (spin_is_locked (&lock->wait_lock));/* * Get the highest prio one: *
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Re: [PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests
Quoted 3 lines · Tom Rini
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
Tom,
TRACE_BUG_ON_LOCKED(!spin_is_locked(&lock->wait_lock));
_is_ correct. Those locks must be locked at those cases. If it isn't then we wan't to trigger a bug. Hence the "BUG_ON" part. You can never guarantee that a lock will be unlock since another process on another CPU might have it.
Now if you are getting a BUG, where as one of these places the lock is _not_ held, then that's a bug.
Hmm, I wonder if these should be switched to __raw_spin_is_locked.
Oh wait, is this a UP system? Shoot, spin_is_locked on UP is defined as zero so this _would_ trigger. Ouch!
Ingo, I guess we need a TRACE_BUG_ON_LOCKED_SMP() macro.
-- Steve
Re: [PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests
Quoted 8 lines · Steven Rostedt
Quoted 3 lines · Tom Rini
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
Ingo, I guess we need a
TRACE_BUG_ON_LOCKED_SMP()macro.
Tom,
try this patch instead. It removes the tests of the spin_is_locked on UP.
-- Steve
kernel/rt.c +18 -7
@@ -215,6 +215,16 @@TRACE_BUG_LOCKED (); \ } while (0) +#ifdef CONFIG_SMP +# define TRACE_BUG_ON_LOCKED_SMP (c) \ +do { \ + if (unlikely(c)) \ + TRACE_BUG_LOCKED(); \ +} while (0) +#else +# define TRACE_BUG_ON_LOCKED_SMP (c) do { } while (0) +#endif +# define trace_local_irq_disable (ti) raw_local_irq_disable()# define trace_local_irq_enable (ti) raw_local_irq_enable()# define trace_local_irq_restore (flags, ti) raw_local_irq_restore(flags)
@@ -237,6 +247,7 @@# define TRACE_WARN_ON_LOCKED (c) do { } while (0)# define TRACE_OFF () do { } while (0)# define TRACE_BUG_ON_LOCKED (c) do { } while (0) +# define TRACE_BUG_ON_LOCKED_SMP (c) do { } while (0)#endif /* CONFIG_RT_DEADLOCK_DETECT */
@@ -736,8 +747,8 @@if (old_owner == new_owner)return ; -TRACE_BUG_ON_LOCKED (!spin_is_locked (&old_owner->task->pi_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&new_owner->task->pi_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&old_owner->task->pi_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&new_owner->task->pi_lock));plist_for_each_safe (curr1, next1, &old_owner->task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);if (w->lock == lock) {
@@ -770,8 +781,8 @@return ; } -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&p->pi_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&p->pi_lock));#ifdef CONFIG_RT_DEADLOCK_DETECT pi_prio++;if (p->policy !=SCHED_NORMAL && prio >normal_prio (p)) {
@@ -967,8 +978,8 @@/* * Add SCHED_NORMAL tasks to the end of the waitqueue (FIFO): */ -TRACE_BUG_ON_LOCKED (!spin_is_locked (&task->pi_lock)); -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&task->pi_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&lock->wait_lock));#if !ALL_TASKS_PI if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);
@@ -1070,7 +1081,7 @@struct rt_mutex_waiter *waiter =NULL ;struct thread_info *new_owner; -TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED_SMP (!spin_is_locked (&lock->wait_lock));/* * Get the highest prio one: *
Re: [PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests
Quoted 8 lines · Steven Rostedt
Quoted 7 lines · Steven Rostedt
Quoted 3 lines · Tom Rini
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
Quoted 7 lines
Quoted 1 line
Ingo, I guess we need a
TRACE_BUG_ON_LOCKED_SMP()macro.Tom,
try this patch instead. It removes the tests of the
spin_is_lockedon UP.
This of course works too, thanks!
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Ingo Molnar
AppliedRe: [PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests
In reply to Tom RiniQuoted 6 lines · Tom Rini
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
Signed-off-by Tom Rini <[email protected]>
thanks, applied.
Ingo
Re: [PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests
Quoted 11 lines · Ingo Molnar
Quoted 6 lines · Tom Rini
With 2.6.13-rt4 I had to do the following in order to get my paired down config booting on my x86 whitebox (defconfig works fine, after I enable enet/8250_console/nfsroot). Daniel Walker helped me trace this down.
Signed-off-by Tom Rini <[email protected]>thanks, applied.
actually - the inversion of the tests is incorrect on SMP. The right solution is Steven Rostedt's patch. (i took another variant of that approach, from Thomas Gleixner)
Ingo