Re: [patch] Real-Time Preemption, -RT-2.6.11-rc2-V0.7.36-04

From: Ingo Molnar
Date: Wed Feb 02 2005 - 02:09:17 EST



* Lee Revell <rlrevell@xxxxxxxxxxx> wrote:

> OK. Rereading my old mail, it looks like there were some possibly
> unresolved false positives with the userspace atomicity debugger.
>
> Here's one I get from alsaplayer. Would more information be required
> to know if this is a false positive?

this is a false positive that only triggers if PREEMPT_RT is disabled.
Does the patch below fix it? (i've also updated the -37-03 patch that
includes it.)

Ingo

--- linux/lib/rwsem.c.orig
+++ linux/lib/rwsem.c
@@ -169,6 +169,8 @@ rwsem_down_failed_common(struct rw_semap

/* wait to be given the lock */
for (;;) {
+ unsigned long nosched_flag = current->flags & PF_NOSCHED;
+
if ((sleep_state == TASK_INTERRUPTIBLE) &&
signal_pending(current)) {
spin_lock(&sem->wait_lock);
@@ -181,7 +183,10 @@ rwsem_down_failed_common(struct rw_semap
}
if (!waiter->task)
break;
+
+ current->flags &= ~PF_NOSCHED;
schedule();
+ current->flags |= nosched_flag;
set_task_state(tsk, sleep_state);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/