Re: Strange scheduling behavoir in SMP (kernel 2.2.14)

From: Rik van Riel (riel@nl.linux.org)
Date: Fri Jan 28 2000 - 23:31:40 EST


On Fri, 28 Jan 2000, Stephen C. Tweedie wrote:
> On Fri, 28 Jan 2000 10:18:16 +0100,
> michael_schulz@public.uni-hamburg.de said:
>
> >> xosview is scheduled. You just invalidated your experiment at that
> >> point
>
> > What about cpu0: xosview, cpu1: tight loop and they stay where they
> > are? The scheduler was written in order to exactly do that, but
> > somehow it doesn't. Why?
>
> Umm, what CPU is X going to run on in that case?
>
> You have two high-priority, interactive tasks to be scheduled: X
> and xosview. You have one low-priority background task --- the
> benchmark. If both xosview and X are ever runnable at the same
> time, then the benchmark task MUST be bumped off the cpu. And if
> the other cpu becomes free first, then what are you going to do?
> Leave it idle? That may win in some cases but in general it's a
> bad idea to bet that way.

Actually, we can measure this and take it into account.
In 2.3 we can use tsk->avg_slice and cacheflush_time to
decide if you want to wait on this cpu or take advantage
of another (idle) cpu...

We should be able to check for this in __schedule_tail()
and set a flag in the long-running process accordingly.

cheers,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

- 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:23 EST