Paul Palumbo wrote:
Any help would be appreciated. I've been fighting with this for many weeks now
and getting nowhere.
I also have a real-time application (using RedHawk Linux) which is doing other things
besides OSG stuff. I tried to shield and set the affinity of my other processes but I'm
having trouble "controlling" where the OSG threads are running. I have a
limited number of CPUs/Cores (4 in particular). Running OSG in SingleThreaded model seems
to be hard coded to use CPU 0 and 1 which isn't good. The other threading models seem to
spray all but CPU 0 with threads. I also need to use the DatabasePager.
What is the best way to configure OSG for this environment? Can somebody
explain the other OSG threading models?
Hi, Paul,
Not sure about 2.6, but looking throught the source for 2.8, the code
for setting processor affinity seems to be in osgViewer/ViewerBase.cpp
and its descendants Viewer.cpp and CompositeViewer.cpp. DatabasePager
might be elsewhere (just grep the source for "setProcessorAffinity").
As you indicated, it seems to be hard-coded at the moment. There
doesn't seem to be any way to configure it from the application. You'll
have to either change the hard-coded values in your copy of OSG, or dive
in and implement a way to configure the processor affinity from the
application.
This all assumes that RedHawk supports setting the processor affinity
via pthread_setaffinity_np, or sched_setaffinity. I've never used a
hard real-time Linux distribution myself.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org