Closed tbarbette closed 7 years ago
Hi @tbarbette
It is not completely clear:
If N is not given (just passing --cpu or -a), the offset will be 0, which is the old behaviour considering "-a". If the parameter is not given or N is negative, the thread will have no affinity.
Isn't the old behavior that thread 0 affinity is core 0 ? So after this change to get the equivalent of the previous default behavior is to run "-a 0" ?
Edit: NM, read "if the parameter is not given" as "if the N parameter is not given", which should probably be read as "if the -a parameter is not given"
The previous behaviour of -a is the equivalent of "-a=0" "--cpu=0" or "-a" or "--cpu" as the default if no "=N" is to assume 0.
The previous behaviour of giving nothing (well, after the discussed bugfix already pushed to master) is to give nothing or "-a=-1" "--cpu=-1"
Done. I also added a testie.
Great, thanks Tom!!
Like linuxmodule cpu parameter, it allows to set up an offset N for thread affinity. Click's thread I will be pinned to core I+N. If N is not given (just passing --cpu or -a), the offset will be 0, which is the old behaviour considering "-a". If the parameter is not given or N is negative, the thread will have no affinity.
FWY, this is ignored by DPDK as DPDK uses its own mask in EAL arguments.