migrate system process using cpuset failed
Hi,
some system processes are bound to a specific cpu, but when I want to migrate them to a sub cpuset, the echo will give an error of "write error: Invalid argument": [root@pexserv02 tmp]# numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 node 0 size: 16373 MB node 0 free: 14278 MB node 1 cpus: 4 5 6 7 node 1 size: 16384 MB node 1 free: 15231 MB node distances: node 0 1 0: 10 21 1: 21 10 [root@pexserv02 tmp]# taskset -c -p 31987 pid 31987's current affinity list: 1 [root@pexserv02 tmp]# pwd /dev/cpuset/tmp [root@pexserv02 tmp]# cat cpus 2-3 [root@pexserv02 tmp]# cat mems 0-1 [root@pexserv02 tmp]# echo 31987 > tasks -bash: echo: write error: Invalid argument [root@pexserv02 tmp]# Does anyone know why the migration failed? Thanks |
Pretty obvious I would have thought. The only CPU that the task has affinity to isn't in the subset.
Change its affinity mapping first. |
Quote:
[root@pexserv02 tmp]# cat /dev/cpuset/cpus 0-7 [root@pexserv02 tmp]# grep "\<25\>" /dev/cpuset/tasks 25 [root@pexserv02 tmp]# taskset -pc 25 pid 25's current affinity list: 7 [root@pexserv02 tmp]# cat /dev/cpuset/tmp/cpus 1-2,5-7 [root@pexserv02 tmp]# echo 25 > /dev/cpuset/tmp/tasks -bash: echo: write error: Invalid argument [root@pexserv02 tmp]# |
What system/kernel level are you using - and what cpusets doco ?.
cpusets is deprecated, and I haven't used it in years - cgroups is the current implementation (current cpusets gets mapped to cgroups). Maybe you're hitting a compatibility snag. I always follow the cgroups doco and mount at /sys. However it is also true that I don't have (never had) access to NUMA equipment to test. |
Quote:
I am not aware that cpuset is deprecated. I will try cgroups. |
All times are GMT -5. The time now is 04:23 AM. |