Re: [PATCH] 2.6.0 batch scheduling, HT aware

From: Pavel Machek
Date: Fri Dec 26 2003 - 18:28:24 EST


Hi!

> I've done a resync and update of my batch scheduling that is also hyper-thread
> aware.
>
> What is batch scheduling? Specifying a task as batch allows it to only use cpu
> time if there is idle time available, rather than having a proportion of the
> cpu time based on niceness.
>
> Why do I need hyper-thread aware batch scheduling?
>
> If you have a hyperthread (P4HT) processor and run it as two logical cpus you
> can have a very low priority task running that can consume 50% of your
> physical cpu's capacity no matter how high priority tasks you are running.
> For example if you use the distributed computing client setiathome you will
> be effectively be running at half your cpu's speed even if you run setiathome
> at nice 20. Batch scheduling for normal cpus allows only idle time to be used
> for batch tasks, and for HT cpus only allows idle time when both logical cpus
> are idle.

BTW this is going to be an issue even on normal (non-HT)
systems. Imagine memory-bound scientific task on CPU0 and nice -20
memory-bound seti&home at CPU1. Even without hyperthreading, your
scientific task is going to run at 50% of speed and seti&home is going
to get second half. Oops.

Something similar can happen with disk, but we are moving out of
cpu-scheduler arena with that.

[I do not have SMP nearby to demonstrate it, anybody wanting to
benchmark a bit?]
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/