lkml.org 
[lkml]   [2005]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.11-rc2-V0.7.37-02
From
Date
On Sat, 2005-02-05 at 08:59 +0100, Ingo Molnar wrote:

> hm - i had a fix in this area in the -V0.7 series. Then i thought this
> is a performance fix only and dropped it eventually, but could you give
> it a go - does it fix the deadlock?
>
> Ingo

Yep, it worked! I tried a similar fix earlier but I put the preempt
disable before the setting of q->status (duh!) and it didn't work. But
it was late and I was tired of looking at it. I was about to say that I
already tried it, but then noticed the placement of preempt_disable, and
thought, I better try yours anyway. Well, it seems to fix it. By the
way, I just put in the disable and enable in -37. I haven't gotten to
your 38 yet, but this fixed 37.

Thanks,

-- Steve

>
> --- linux/ipc/sem.c.orig
> +++ linux/ipc/sem.c
> @@ -359,12 +371,18 @@ static void update_queue (struct sem_arr
> struct sem_queue *n;
> remove_from_queue(sma,q);
> n = q->next;
> + /*
> + * Make sure that the wakeup doesnt preempt
> + * _this_ CPU prematurely. (on PREEMPT_RT)
> + */
> + preempt_disable();
> q->status = IN_WAKEUP;
> wake_up_process(q->sleeper);
> /* hands-off: q will disappear immediately after
> * writing q->status.
> */
> q->status = error;
> + preempt_enable();
> q = n;
> } else {
> q = q->next;

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

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:1.690 / U:2.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site