Re: RasterMan on linux and threads

Chris Wedgwood (cw@f00f.org)
Fri, 17 Dec 1999 22:00:25 +1300


On Fri, Dec 17, 1999 at 03:46:27AM -0500, jgarzik@mandrakesoft.com wrote:
> Rant from http://www.rasterman.com/news.html:
>
> [...]
> Also threads right now under linux all run on the same processor so
> under linux there is NO speed advantage to threads. You just end up
> context switching between lots of threads - a single threaded program
> can do just as well as multi-threaded, so I gave up on my ideas of
> silently spawning threads inside the library to render in paralell. So
> there u have it - threads are pretty usless - if you just think they're
> cool - you're in for a shock - they give little speedup, and just
> introduce lots of concurrency issues that are horrendously hard to debug
> and unless your an expert programmer - you will run into them - so avoid
> threads at all costs.

Has anyone actually benchmarked this?

The merits of threads aside, thread <-> thread context switches with
the same VM are faster than thread <-> thread contect switched
between two processes -- they are in fact as fast and any thread
implementation on x86...

-cw

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