-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
(Logfile attached.)
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-15 y 0 y 224 0 /
# Take "last" core offline
root@localhost:~# echo 0 > /sys/devices/system/cpu/cpu15/online
root@localhost:~# cset shield -c2-5
cset: --> activating shielding:
cset: moving 37 tasks from root into system cpuset...
[==================================================]%
cset: "system" cpuset of CPUSPEC(0-1,6-14) with 37 tasks running
cset: "user" cpuset of CPUSPEC(2-5) with 0 tasks running
# cset shield succeeds
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-14 y 0 y 187 2 /
user 2-5 y 0 n 0 0 /user
system 0-1,6-14 y 0 n 37 0 /system
root@localhost:~# cset shield -r
cset: --> deactivating/reseting shielding
cset: moving 0 tasks from "/user" user set to root set...
cset: moving 37 tasks from "/system" system set to root set...
[==================================================]%
cset: deleting "/user" and "/system" sets
cset: done
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-14 y 0 y 225 0 /
# Restore "last" core
root@localhost:~# echo 1 > /sys/devices/system/cpu/cpu15/online
# Take second last core offline
root@localhost:~# echo 0 > /sys/devices/system/cpu/cpu14/online
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-13,15 y 0 y 225 0 /
# cset shield fails
root@localhost:~# cset -l /tmp/bad_shield shield -c2-5
cset: --> failed to create shield, hint: do other cpusets exist?
cset: **> [Errno 22] Invalid argument
# HOWEVER! I can manually create a non-contiguous set (not using "shield")
[bad_shield.txt](https://github.com/lpechacek/cpuset/files/5431496/bad_shield.txt)
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-13,15 y 0 y 212 0 /
root@localhost:~# cset set -c2-5 --cpu_exclusive user
cset: --> created cpuset "user"
root@localhost:~# cset set
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-13,15 y 0 y 212 1 /
user 2-5 y 0 n 0 0 /user
Metadata
Metadata
Assignees
Labels
No labels