Re: bug in Real-Time Preemption

From: Esben Nielsen
Date: Fri Jun 10 2005 - 02:49:42 EST


On Fri, 10 Jun 2005, Milan Svoboda wrote:

> > I tried to your program: I couldn't make it fail under PREEMPT_RT. No
> > matter what the termination value for the while loop in the priority 10
> > thread I put in the priority 50 thread printed the same "Dif:".
> > I also put in a global variable, thread_done, which I set in the priority
> > 10 thread after the loop and printed it out along with "Dif:". It was not
> > set. I also tried to add exit(1) at the end of the priority 10 thread...
> >
> > I see no odd behaviour.
> >
> > Esben
> >
>
> Look at my results:
>
> I added a flag too.
>
> under non RT preempt:
> (these results are expected)
>
> ./a.out
> Flag: 0, Dif:11714
> ./a.out
> Flag: 0, Dif:11678
>
(Flag:0 means the counting thread haven't finished, right?)

This is what I see on PREEMPT_RT 2.6.12-rc6-V0.7.48-04.

> under full RT preempt:
> ./a.out
> Flag: 1, Dif:582536
> ./a.out
> Flag: 1, Dif:579791
>
> This shows that thread with bigger priority was
> blocked by the thread with lower priority!
>

Yes. Odd. Tried on V0.7.48-04 ?

Esben

-
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/