Re: Real-Time Preemption, -RT-2.6.12-final-V0.7.51-12

Peter Zijlstra
2005-07-10T15:43:59Z

On Sun, 2005-07-10 at 17:10 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> > > I can reproduce priority leakage on my SMP system; any userspace process
> > > chrt'ed up and a lot will follow. This makes the system very
> > > unresponsive when doing a make -j5. Verified on 51-{6,18,23}.
> > >
> >
> > The following patch seems to fix it for me, YMMV.
> >
> > --- kernel/sched.c~ 2005-07-08 10:27:59.000000000 +0200
> > +++ kernel/sched.c 2005-07-10 13:00:42.000000000 +0200
> > @@ -780,7 +780,8 @@ static void recalc_task_prio(task_t *p,
> > }
> > }
> >
> > - p->prio = p->normal_prio = effective_prio(p);
> > + p->prio = effective_prio(p);
> > + p->normal_prio = unlikely(rt_prio(p->normal_prio)) ? p->prio : __effective_prio(p);
> > }
>
> ahh, indeed, this code did not take boosting into account. Good catch!
> I'm wondering why this only showed up on SMP.

I was thinking because of the agressive RT rebalance code this codepath
is more exercised on SMP systems.

> I've fixed it a bit
> differently in my tree, by making the roles of the various priority
> fields and functions more obvious, see the delta patch below.

Yes, much nicer :-)

> I've also
> released the -51-23 patch with these changes included. Does this fix
> priority leakage on your SMP system?
>

-51-24 right? I'll give it a spin.

--
Peter Zijlstra <a.p.zijlstra@chello.nl>