Re: Strange scheduling behavoir in SMP (kernel 2.2.14)

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon Jan 31 2000 - 12:23:22 EST


Hi,

On Fri, 28 Jan 2000 19:54:26 +0100, Michael Schulz
<michael_schulz@public.uni-hamburg.de> said:

> Simple question then as at least to me the picture is not clear jet:
> How expensive is it to awake the background process and put it on a
> _different_ cpu? Will this hurt more than help? Is this tradeoff
> balanced enuf for most real world situations?

That's not the situation --- the problem is what to do if you have two
foreground tasks running on two cpus, and one sleeps. You don't have
the option of scheduling the background task on the other CPU at this
point --- at least, not without forcing a CPU switch on the other
foreground task, which rather defeats the purpose of the exercise. So
you either have to run it on the local CPU, which may not have been the
last one to run the background task, or you have to just leave the local
CPU idle in the hope that the background task will soon be able to get a
shot at its "home" CPU.

That's why if you have a background task and two interactive tasks on a
2-CPU machine, you really cannot avoid the background task jumping
between CPUs unless you are willing to leave a CPU idle at times (and
that, in general, is a very bad thing to do.)

--Stephen

-
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 : Mon Jan 31 2000 - 21:00:29 EST