Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement command line option for easy pinning of threads to NUMA domains and Cores #685

Closed
sithhell opened this issue Jan 30, 2013 · 3 comments

Comments

@sithhell
Copy link
Member

Currently we have pu-step and pu-offset to control the placement of threads onto cores.
This is very flexible and can be used in most cases.
However once the complexity of the hardware topology increases these options are cumbersome to use. Instead a command line with easy descriptive names should be used.
Examples for already existing solutions are hwloc-bind and likwid-pin

@hkaiser
Copy link
Member

hkaiser commented Feb 1, 2013

These command line options should allow specifying what processing units should threads should be bound to. Generally threads can be bound based on socket, numanode, core, or pu (processing unit). The format to specify processing units for a thread should be:

mappings:
    mapping(;mapping)*

mapping:
    thread-spec=pu-specs

thread-spec:
    thread:int
    thread:int-int
    thread:all

pu-specs:
    pu-spec(.pu-spec)*

pu-spec:
    type:range-specs
    ~pu-spec

range-specs:
    range-spec(,range-spec)*

range-spec:
    int
    int-int
    all

type:
    socket | numanode
    core
    pu

All literals (like thread, socket, etc.) can be abbreviated.

For example:

 thread:0=socket:0         binds thread 0 to the processing units of the first socket
 thread:4=socket:2.pu:1    binds thread 5 to the second pu of the thrid socket
 thread:3=core:all.pu:0    binds thread 4 to the first pus of all cores

 t:0-3=c:0-3.p:0           binds thread 1-4 to the first pus of the first 4 cores

 thread:1,3,5=core:all.pu:1  binds threads 1, 3, and 5 to the second pus of all cores

hkaiser added a commit that referenced this issue Feb 2, 2013
@sithhell
Copy link
Member Author

sithhell commented Feb 3, 2013

This proposal exceeds my expectations. Nice work.

@hkaiser
Copy link
Member

hkaiser commented Feb 7, 2013

This has been merged to master with 18f1381

@hkaiser hkaiser closed this as completed Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants