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/