On Sat, 2007-12-15 at 11:07 -0700, Brian Paul wrote: > Keith Packard wrote: > > The pthreads library introduces significant overhead for single-threaded > > applications, > > Just out of curiosity, have you made some measurements?
Yeah, we're seeing 5-10% locking overhead in some preliminary i965 code which is hitting mutexes fairly hard. A lot of that is caused by reference counting, which could switch to atomic instructions, but still, it might be nice to simply skip mutexes for single threaded apps. > Sounds like a good idea. Any GL app that's multithreaded should be > linking with -lpthreads in the first place so I don't see much risk for > breakage (undefined thread funcs at run/load time). I'm cooresponding with Ulrich to see if he's got a better plan. Right now, the only way I've gotten it working is by using a separate library with glthreads.c. Ick. > I guess the new code would go in the glthreads.c file, protected by > #ifdef __GNU_C__ (or whatever). Nope, it's in a separate file and built into a separate library. I don't like this, but I haven't figured out how to make it work inside libGL. > I say go ahead, but maybe not on mesa_7_0_branch for now. Yeah, I'd stick it on a branch. The only change it makes right now is to build this new library and have libGL link to that instead of -lpthread, so it's nicely isolated. -- [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
