Strange scheduling behavoir in SMP (kernel 2.2.14)

Rik van Riel riel en nl.linux.org
Sab Ene 29 09:26:42 CST 2000


On Fri, 28 Jan 2000, Stephen C. Tweedie wrote:
> On Fri, 28 Jan 2000 10:18:16 +0100,
> michael_schulz en 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 en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda