[lkml]   [2007]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [REPORT] cfs-v4 vs sd-0.44

* Linus Torvalds <> 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 unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-23 21:17    [W:0.148 / U:0.248 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site