Re: Scheduler problems

Rik van Riel (riel@nl.linux.org)
Thu, 21 Jan 1999 12:05:11 +0100 (CET)


On Wed, 20 Jan 1999, Stephen C. Tweedie wrote:
> On Tue, 19 Jan 1999 20:43:12 +0100 (CET), MOLNAR Ingo
> <mingo@chiara.csoma.elte.hu> said:
> > On Tue, 19 Jan 1999, Stephen C. Tweedie wrote:
>
> > yes i have a patch for this but it's not straightforward enough for 2.2.
> > (ie. a 50k patch) It has to do things like a full goodness() run for every
> > CPU in wakeup(), which is less than ideal.
>
> Ingo, before I read this I was thinking about it a little and yes, this
> was one of the issues which worried me. However, is there any reason
> why we can't just use the last known goodness of the process currently
> running on each CPU, rather than recalculating the current goodness?

The biggest problem is that p->counter is essentially a
random value because of the gross recalculation done in
the schedule() function.

If we were to use a more smoothed out recalculation
[p->counter = (((p->counter * 7) + p->priority + 7) / 8);]
then we could just use p->counter without ever having to
do any expensive recalculations.

regards,

Rik -- If a Microsoft product fails, who do you sue?
+-------------------------------------------------------------------+
| Linux memory management tour guide. riel@nl.linux.org |
| Scouting Vries cubscout leader. http://www.nl.linux.org/~riel |
+-------------------------------------------------------------------+

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