Re: RasterMan on linux and threads

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Sat, 18 Dec 1999 01:16:17 +0100 (CET)


On Fri, 17 Dec 1999, Brian Pomerantz wrote:

> Basically when you start a thread, the likelihood of it running on
> another CPU than the one the original process is running is small if
> the thread is short lived. The reason for this is the scheduler gives
> priority to a process on the same CPU as the one currently running and
> more priority if that process shares the same VM as the one that was
> just running. If a thread lives long enough or there is a large
> number of threads sharing the same VM, eventually it/they will migrate
> across more CPUs. Threads are no different than processes in this
> regard.

this is false. We wake up any newly created thread, which means that we
immediately send a cross-CPU message to any potential idle CPU to run this
new thread. I've just measured this on pre1-2.3.34 - we start running the
newly created thread within 15 microseconds _on another CPU_ after it got
created.

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/