[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070419080053.GA4106@elte.hu>
Date: Thu, 19 Apr 2007 10:00:53 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Davide Libenzi <davidel@...ilserver.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Matt Mackall <mpm@...enic.com>, Nick Piggin <npiggin@...e.de>,
William Lee Irwin III <wli@...omorphy.com>,
Peter Williams <pwil3058@...pond.net.au>,
Mike Galbraith <efault@....de>,
Con Kolivas <kernel@...ivas.org>, ck list <ck@....kolivas.org>,
Bill Huey <billh@...ppy.monkey.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arjan van de Ven <arjan@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]
* Davide Libenzi <davidel@...ilserver.org> wrote:
> > That's one reason why i dont think it's necessarily a good idea to
> > group-schedule threads, we dont really want to do a per thread group
> > percpu_alloc().
>
> I still do not have clear how much overhead this will bring into the
> table, but I think (like Linus was pointing out) the hierarchy should
> look like:
>
> Top (VCPU maybe?)
> User
> Process
> Thread
>
> The "run_queue" concept (and data) that now is bound to a CPU, need to be
> replicated in:
>
> ROOT <- VCPUs add themselves here
> VCPU <- USERs add themselves here
> USER <- PROCs add themselves here
> PROC <- THREADs add themselves here
> THREAD (ultimate fine grained scheduling unit)
>
> So ROOT, VCPU, USER and PROC will have their own "run_queue". Picking
> up a new task would mean:
>
> VCPU = ROOT->lookup();
> USER = VCPU->lookup();
> PROC = USER->lookup();
> THREAD = PROC->lookup();
>
> Run-time statistics should propagate back the other way around.
yeah, but this looks quite bad from an overhead POV ... i think we can
do alot simpler to solve X and kernel threads prioritization.
> > In fact for threads the _reverse_ problem exists, threaded apps tend
> > to _strive_ for more performance - hence their desperation of using
> > the threaded programming model to begin with ;) (just think of media
> > playback apps which are typically multithreaded)
>
> The same user nicing two different multi-threaded processes would
> expect a predictable CPU distribution too. [...]
i disagree that the user 'would expect' this. Some users might. Others
would say: 'my 10-thread rendering engine is more important than a
1-thread job because it's using 10 threads for a reason'. And the CFS
feedback so far strengthens this point: the default behavior of treating
the thread as a single scheduling (and CPU time accounting) unit works
pretty well on the desktop.
think about it in another, 'kernel policy' way as well: we'd like to
_encourage_ more parallel user applications. Hurting them by accounting
all threads together sends the exact opposite message.
> [...] Doing that efficently (the old per-cpu run-queue is pretty nice
> from many POVs) is the real challenge.
yeah.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists