Linux-kernel mailing list archive 2000-04,: Re: Strange scheduling behavoir in SMP (kernel 2.2.14)

# Re: Strange scheduling behavoir in SMP (kernel 2.2.14)

Rik van Riel (riel@nl.linux.org)
Sat, 29 Jan 2000 05:31:40 +0100 (CET)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Andre Hedrick: "Everyone Classic Hardware Crash (Re: 2.3.41-4 / hda: lost interrupt)"
- Previous message: David Dyck: "Re: 2.3.41-4 / hda: lost interrupt"

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/

- Next message: Andre Hedrick: "Everyone Classic Hardware Crash (Re: 2.3.41-4 / hda: lost interrupt)"
- Previous message: David Dyck: "Re: 2.3.41-4 / hda: lost interrupt"