cgroup--cpu spuset ???????????
???????????? ???????[ 2013/10/16 13:50:43 ] ????????
????1.???????
???????μ??????Linux????3.2.6????cgroup?????????????????????????????????????????Cgroup?ж???CPU???????????????cpu??cpuset????????????????cpu?????????????????????????y??????CPU?????????cpuset?????????????????????ЩCPU???????(NUMA)??
?????????????????? cgroup ?? cpu ??cpuset??????????????????????????cpu.shares??cpu.rt_period_us ??cpu.rt_runtime_us ????????????÷?????
????2.????????
ubuntu 11.10
3.0.0-26-generic-pae
4 Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
????3.???????
?????????
mount -t tmpfs cgroup_root /sys/fs/cgroup
mkdir /sys/fs/cgroup/cpuset
mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
????????????
????root@ubuntu:/sys/fs/cgroup/cpuset# mkdir tailor tinker
???????? ??
????root@ubuntu:~# mount -t cgroup -o cpu none /sys/fs/cgroup/cpu
????????????
????root@ubuntu:/sys/fs/cgroup/cpu# mkdir tailor tinker
??????????????????
????sina@ubuntu:~$ ./a.out &
????[2] 3944
????sina@ubuntu:~$ ./a.out &
????[2] 3945
??????????????? cpu cpuset??????棺
????sina@ubuntu:/sys/fs/cgroup/cpuset/tinker$ echo 3944 > tasks
????sina@ubuntu:/sys/fs/cgroup/cpuset/tailor$ echo 3945 > tasks
????sina@ubuntu:/sys/fs/cgroup/cpu/tailor$ echo 3945 > tasks
????sina@ubuntu:/sys/fs/cgroup/cpu/tinker$ echo 3944 > tasks
???????? cpu???????? cpu.shares
????[html] view plaincopy
????sina@ubuntu:/sys/fs/cgroup/cpu/tailor$ echo 1024 > cpu.shares
????sina@ubuntu:/sys/fs/cgroup/cpu/tinker$ echo 512 > cpu.shares
???????????????cpu affinity??
????sina@ubuntu:/sys/fs/cgroup/cpuset/tailor$ echo 3 > cpuset.cpus
????sina@ubuntu:/sys/fs/cgroup/cpuset/tinker$ echo 3 > cpuset.cpus
???????????????cpu??????????? ??????????????????????ò?????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11