Re: goodness in reschedule idle

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Thu, 3 Dec 1998 21:43:05 +0100 (CET)


On Thu, 3 Dec 1998, Andrea Arcangeli wrote:
> On Thu, 3 Dec 1998, Rik van Riel wrote:
>
> >I think it's a bit of an overkill as it is now, but if you
> >include checks for _all_ processors it might make for a
> >pretty decent SMP reschedule_idle.
>
> My point is not only SMP, it' s that doing that we call schedule()
> only when we are sure that next will be != than prev.

You seem to forget that the common case is one CPU bound
process getting interrupted by X, pine or your regular
text-mode editor.

The case where next == prev should be quite rare and
probably not worth tuning for on a UP system. OTOH,
on an SMP system we lose bigtime when we fool around
with the caches and unneccesarily flush the CPUs and
clog up the memory bus.

I think your addition would certainly be worth it on SMP
systems, as long as we do the check on each CPU. In order
to do this we'd need a cpu[cpu_nr]->current pointer and
maybe some other magic. I see no reason why we shouldn't
do this...

regards,

Rik -- the flu hits, the flu hits, the flu hits -- MORE
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~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/