Re: [RFC] observe and act upon workload parallelism:PERF_TYPE_PARALLELISM (Was: [RFC][PATCH] sched_wait_block: wait for blockedthreads)

From: Alan Cox
Date: Mon Nov 16 2009 - 13:30:31 EST


On Mon, 16 Nov 2009 10:02:50 -0800 (PST)
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

>
>
> On Mon, 16 Nov 2009, Ingo Molnar wrote:
> >
> > Regarding the API and your patch, i think we can and should do something
> > different and more capable - while still keeping your basic idea:
>
> Actually, I'd suggest exactly the reverse.
>
> Yes, do something different, but _less_ capable, and much simpler:
> introduce the notion of "grouped thread scheduling", where a _group_ of
> threads gets scheduled as one thread.

And preferably expose it so it can be used by groups of processes as well
as just "threads" in the userspace shared pid etc sense. There are quite
a few applications where both "only run one of us" and "don't pre-empt
within the group" are a useful semantic (you often don't want the
pre-empting within the group of threads because it messes up all the
improved locking opportunities). In particular the usual buzz locks don't
mix well with "only run one of us".

Alan
--
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/