Linux compatible setaffinity.
peterjeremy at optushome.com.au
Wed Feb 20 13:58:19 UTC 2008
On Tue, Feb 19, 2008 at 11:55:22PM -1000, Jeff Roberson wrote:
>So what does everyone think of something like this:
>int cpuaffinity(int cmd, long which, int masksize, unsigned *mask);
>#define AFFINITY_GET 0x1
>#define AFFINITY_SET 0x2
>#define AFFINITY_PID 0x4
>#define AFFINITY_TID 0x8
>I'm not married to any of these names. If you know of something that would
>be more regular please comment.
It's probably not immediately relevant (because I don't have suitable
code and doubt you do either) but how would this extend to:
- a process wanting to set thread affinity to the h/w theads associated
with a single core (which includes the issue of identifying which
logical CPUs are linked with which physical cores)
- a process wanting to take advantage of a system's NUMA topology to
optimise thread affinities.
- creating sets of logical CPUs and assigning sets of processes/threads
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20080220/f7449f51/attachment.pgp
More information about the freebsd-arch