Taskset not working properly in OpenVZ container

In a Debian OpenVZ container, I'm trying to use taskset to pin a process to a core, but it doesn't work:

root@foo:/# taskset -c -p 0 1754
pid 1754's current affinity list: 0-7
pid 1754's new affinity list: 0-7

The exact same thing works on the host.


Solution 1:

As I recommended you in twitter there are few solutions: vzctl set XXXX --cpumask 0,1 --save

And after this operations taskset should work. If it not working yet, please create ticket to bugzilla.openvz.org because it seems as bug.