On 10/05/2012 04:55 AM, paul graham wrote:
Hi all, we've been having some intermittent deadlock issues and as part of my
investigation I noticed that our (albeit quite old - 2.9.8, we shall be
upgrading imminently) OSG libs were being compiled with
_OPENTHREADS_ATOMIC_USE_MUTEX.
On further investigation, it appears that the test for availability of
_OPEN_THREADS_ATOMIC_USE_GCC_BUILTINS on our particular architecture (Linux RH 5.6)
requires the additional compiler argument "-march=i686" in order to pass and
hence not default to using mutexes.
Hi, Paul,
Coming from previous RHEL 5 experience, yes, you are correct. The gcc
version on RHEL5 doesn't assume a 686 architecture, and hence, won't
enable the atomic builtins unless you explicitly ask.
Would I be right in thinking that building with
_OPEN_THREADS_ATOMIC_USE_GCC_BUILTINS instead of _OPENTHREADS_ATOMIC_USE_MUTEX
should provide significant 'general' performance improvement?
It certainly won't hurt. Whether you see a noticeable improvement will
depend on your application.
On a related note - our investigations into these deadlocks has proved very
difficult since typically the thread stacktraces recorded at the point of
deadlock can't be traced further back beyond libGL.so - if anyone has
experience of similar situations, I'd welcome any advice.
Sorry, can't help with this, other than to say that an upgrade to
version 3.0.1 (or later) would be a good idea, as there have been some
fixes related to intermittent deadlocks since the version you're running.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org