re: RasterMan on linux and threads

raster@rasterman.com
Wed, 15 Dec 1999 19:14:38 -0500 (EST)


On 17 Dec, Dan Kegel scribbled:
-> re http://kernelnotes.org/lnxlists/linux-kernel/lk_9912_03/msg00480.html
->
-> Rasterman is wrong in saying that all threads run on the same

hmm - when did that change ? i thought that was the case and was baked
up on hat asumtion by someone else a few weeks ago (primarily the
reason being to make sure the threads share caches for speed reasons
and to make sure cache concurrency issues are moe easiyl dealt with...
well thats what i unerstood... i may be wrong (2.2 or 2.3 may have
changed that)

-> processor, but everything else he says about threads is spot on:
-> unless you have a real good reason to create a thread, don't.
-> Ousterhout certainly agrees. See his slides on "Why threads are bad (usually)"
-> at http://www.scriptics.com/people/john.ousterhout/
->
-> Earlier in his news page, Raster says:
-> > The [imlib2] API changed a lot recently - it's now context based (you set
-> > the current context) and it uses that current context for almost all
-> > calls. It means many fewer parameters to many calls - but it also means
-> > Imlib2 is NOT thread-safe as the context is global. If anyone wants to
-> > work on making it thread safe - there's source code and send patches -
-> > but I don't see much value in it. Do all your graphics work in 1 thread.
->
-> Wow, deja vu. Right on the heels of Jim Gettys' post on the same subject,
-> http://kernelnotes.org/lnxlists/linux-kernel/lk_9912_03/msg00096.html
->
-> Raster, you might want to read Jim's post. X calls use lots of context
-> parameters (like old imlib), OpenGL calls use none (like new imlib2), and
-> now they both wish they'd used a single one (i.e. an object oriented approach).

yeah - i saw - i'm mimickign opengl's model more than X's primarily
because i plan on using opengl to accelerate imlib2 transparently at
the back end (so use optimised software for non opengl/glx situations
and opengl (glx) otherwise if opengl is sufficiently well acelerated)
thus usign a similar conext system to opengl is most useful :)

-> And you might want to modify your statement that threads always run on the same
-> CPU...

hmmm - when did that change - i know solarids has them run on multiple
cpu's though...

-> - Dan
->

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com     raster@valinux.com
                                    raster@enlightenment.org raster@linux.com
				    raster@zip.com.au

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