|| ||Ingo Molnar <mingo-AT-elte.hu>|
|| ||Linus Torvalds <torvalds-AT-linux-foundation.org>|
|| ||Re: [REPORT] cfs-v4 vs sd-0.44|
|| ||Mon, 23 Apr 2007 21:11:43 +0200|
|| ||Nick Piggin <npiggin-AT-suse.de>,
Juliusz Chroboczek <jch-AT-pps.jussieu.fr>,
Con Kolivas <kernel-AT-kolivas.org>, ck list <ck-AT-vds.kolivas.org>,
Bill Davidsen <davidsen-AT-tmr.com>, Willy Tarreau <w-AT-1wt.eu>,
William Lee Irwin III <wli-AT-holomorphy.com>,
Andrew Morton <akpm-AT-linux-foundation.org>,
Mike Galbraith <efault-AT-gmx.de>,
Arjan van de Ven <arjan-AT-infradead.org>,
Peter Williams <pwil3058-AT-bigpond.net.au>,
Thomas Gleixner <tglx-AT-linutronix.de>, caglar-AT-pardus.org.tr,
Gene Heskett <gene.heskett-AT-gmail.com>|
* Linus Torvalds <email@example.com> wrote:
> but the point I'm trying to make is that X shouldn't get more CPU-time
> because it's "more important" (it's not: and as noted earlier,
> thinking that it's more important skews the problem and makes for too
> *much* scheduling). X should get more CPU time simply because it
> should get it's "fair CPU share" relative to the *sum* of the clients,
> not relative to any client individually.
yeah. And this is not a pipe dream and i think it does not need a
'wakeup matrix' or other complexities.
I am --->.<---- this close to being able to do this very robustly under
CFS via simple rules of economy and trade: there the p->wait_runtime
metric is intentionally a "physical resource" of "hard-earned right to
execute on the CPU, by having waited on it" the sum of which is bound
for the whole system.
So while with other, heuristic approaches we always had the problem of
creating a "hyper-inflation" of an uneconomic virtual currency that
could be freely printed by certain tasks, in CFS the economy of this is
strict and the finegrained plus/minus balance is strictly managed by a
conservative and independent central bank.
So we can actually let tasks "trade" in these very physical units of
"right to execute on the CPU". A task giving it to another task means
that this task _already gave up CPU time in the past_. So it's the
robust equivalent of an economy's "money earned" concept, and this
"money"'s distribution (and redistribution) is totally fair and totally
balanced and is not prone to "inflation".
The "give scheduler money" transaction can be both an "implicit
transaction" (for example when writing to UNIX domain sockets or
blocking on a pipe, etc.), or it could be an "explicit transaction":
sched_yield_to(). This latter i've already implemented for CFS, but it's
much less useful than the really significant implicit ones, the ones
which will help X.
to post comments)