Re: SMP Scheduling

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Mon, 9 Aug 1999 15:33:15 +0200 (CEST)


On Mon, 9 Aug 1999, Peter Waltenberg wrote:

> It's not that the process changes CPU's, it's that it's doing it at
> regular intervals that I find worrying.
> Yes, that could just be coincidence, or it could be a real problem.

no, it's a feature, there is nothing to worry about. Start the CPU-hog
with 'nice -n -100 ./cpuhog' and you will see no 'hopping'. The following
thing happens in the scenario you tested: _three_ processes are running at
once, X, xosview and cpuhog. Since all of them have the same static
priority, and X and xosview has much higher 'interactiveness', the
scheduler does the right thing when all these three processes are running
at once.

I've just tried redirecting xosview to another box (this makes the
scheduling scenario 2-process), and there wasnt a single 'CPU-hop' in
minutes. I have seen scheduler patches that 'solve' the above xosview
phenomemon, but they are in reality just destroying the _correct_ behavior
of preempting a CPU-hog with interactive processes. This whole non-issue
is btw. a typical case of the 'observer' (xosview and X) intruding into
the measured system.

-- mingo

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