Re: gthread: how many cores do I have?



On Sun, Apr 4, 2010 at 5:35 PM, Mark Mielke <mark mark mielke cc> wrote:

> Optimally - both counts should be available. How many tasks can I run
> simultaneously at near 100% CPU vs how many tasks can I run simultaneously
> at any % of the CPU.
>
> A task doing video encoding or anything that would monopolize much of the
> CPU, would probably use the first count, whereas something doing heavy I/O
> and quick transfers of data from one thread to the other might choose the
> latter count.

group scheduling makes this *much* more complex than even your
description alludes to.
add in threads running SCHED_FIFO or SCHED_RR and simple-minded
mapping of *any* possible CPU count (virtual, physical, group size,
other) to a thread count becomes incredibly hard to do, and very
application specific.

naturally, if you have a fairly simply application, and always run on
the whole machine, then the issues are not so great. but as a general
solution a lot of what has been proposed is way too simplistic.

--p


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]