This discussion is archived
0 Replies Latest reply: Aug 24, 2009 2:35 AM by 807567 RSS

How to set process affinity

807567 Newbie
Currently Being Moderated
Is there a way to set CPU affinity of a newly created process in a way that will be respected by all the LWPs it creates?

Basically I want to able to say: all the LWPs this process creates should run only on this set of CPUs.

processor_bind() isn't flexible enough, it forces an LWP to run only on 1 CPU.

I thought lgrp_affinity_set() would do the trick, but it doesn't seem to be inherited. New LWPs created by the process don't respect the affinity I set.

Processor sets aren't the solution either, because I don't want to exclude other processes from using these CPUs.

Any ideas?