Re: [PATCH] sched_yield() flawed since 2.2.13?

From: George Anzinger (george@pioneer.net)
Date: Mon May 22 2000 - 12:19:12 EST


Dear Giuseppe,

The point is not the amount of code but the speed of execution there of,
with, of course, the proviso that it do the "right" thing. The problem
I had with your patch is that it added code inside of the schedule
loop. This means it slows the context switch time in direct
relationship to the number of processes in the run list. Note also that
my code avoids an if test on the restoration of the counter. This is to
avoid the penalty of a jump which will flush the processor pipe line.

Oh, by the way, the patch also fixes the sched_rr problem as well as
missing tasks that become ready while sched has the interrupts off but
before it exits.

George

Giuseppe Ciaccio wrote:
>
> On Sat, 20 May 2000, George Anzinger wrote:
>
> > Dear Giuseppe,
> >
> > The indicated patch as well as some other fixes is include in the real
> > time scheduler patch at www.mvista.com
> >
> > This patch not only gives an option to use the new rtsched.c but patches
> > the 2.2.14 sched.c to fix most of the outstanding problems. Below is the
> > part of the patch related to sched.c:)
>
> Your patch adds even more code to schedule(), compared to mine :-)) This
> supports my claim, that is is impossible to fix the sched_yield() bug without
> adding extra code to the scheduler.
>
> Anyway, it is a pity that nobody else seems to realize the importance of the
> sched_yield() bug. It would be nice and useful, if the forthcoming 2.4 kernel
> had a correct implementation of sched_yield()...
>
> Bye,
> Giuseppe
>
> Giuseppe Ciaccio http://www.disi.unige.it/person/CiaccioG/
> DISI - Universita' di Genova via Dodecaneso 35 16146 Genova, Italy
> phone +39 10 353 6638 fax +39 010 3536699 ciaccio@disi.unige.it
> ------------------------------------------------------------------------
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:22 EST