On Mon, 21 Dec 1998, Neil Conway wrote:
> > I've noticed some strange and unneeded CPU switching
> > lately (who hasn't) and have come up with a simple
> > fix.
> >
> > It consists of replacing these lines (at 315 in sched.c):
> >
> > /* Give a largish advantage to the same processor... */
> > /* (this is equivalent to penalizing other processors) */
> > if (p->processor == this_cpu)
> > weight += PROC_CHANGE_PENALTY;
> >
> > With:
> > if (p->processor != this_cpu) {
> > weight -= PROC_CHANGE_PENALTY;
> > return weight;
> > }
>
> Hmm, off the top of my head: won't this break the counter-
> recharging when (no jobs for this cpu && all jobs for other CPU(s)
> need recharging) ?
If all jobs need recharging they will not reach this code
(only executed when p->counter > 0) and the processes will
be spread out evenly over the CPUs.
cheers,
Rik -- the flu hits, the flu hits, the flu hits -- MORE
+-------------------------------------------------------------------+
| Linux memory management tour guide. [EMAIL PROTECTED] |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]