SYNOPSIS
cset [cset options] shield [shield options] [args] cset shield --help cset shield cset shield --cpu 1-7 @@ -426,10 +757,12 @@ cset-shield(1) Manual Page cset shield --unshield --pid 6000-8500 cset shield --kthread=off cset shield --kthread=on -cset shield --shield bash
OPTIONS
-
@@ -550,6 +883,8 @@ cset-shield(1) Manual Page
DESCRIPTION
This is a supercommand that creates basic cpu shielding. The @@ -588,7 +923,7 @@ is running in initially when using the --shield subcommand. be under the shield (this means assigned to the user cpuset, all other cpus will be assigned to the system set).
For example:
# cset shield --cpu=1-3
# cset shield --cpu=1-3
On a 4-way machine, this command will dedicate the first processor, CPU0, for the system set (unshielded) and the last three processors, CPU1, CPU2, CPU3, for the user set (shielded).
For example:
# cset shield --sysset=free --userset=cage --cpu=2,3 --kthread=on
# cset shield --sysset=free --userset=cage --cpu=2,3 --kthread=on
The above command will use the name "free" for the unshielded system cpuset, the name "cage" for the shielded user cpuset, initialize these cpusets and dedicate CPU0 and CPU1 to the "free" @@ -626,7 +961,7 @@ subcommand and the --pid option.
For example:
# cset shield --exec — ls -l
# cset shield --exec — ls -l
This command will execute "ls -l" inside the shield.
The PIDSPEC argument taken for the --pid (or -p) option is a comma separated list of PIDs or TIDs. The list can also include @@ -634,10 +969,10 @@ brackets of PIDs or TIDs that are inclusive of the endpoints.
For example:
1,2,5 Means processes 1, 2 and 5 -1,2,600-700 Means processes 1, 2 and from 600 to 700+
1,2,5 Means processes 1, 2 and 5
+1,2,600-700 Means processes 1, 2 and from 600 to 700
# cset shield --shield --pid=50-65
# cset shield --shield --pid=50-65
The above command moves all processes and threads with PID or TID in the range 50-65 inclusive, from the system cpuset into the shielded user cpuset. If they are running in the root cpuset, @@ -657,7 +992,7 @@ then only that process will be moved.
The --unshield (or -u) subcommand will remove the specified processes or threads from the shielded cpuset and move them into the unshielded (or system) cpuset. This command is also used in -conjuction with a -p/--pid option that specifies a PIDSPEC +conjunction with a -p/--pid option that specifies a PIDSPEC argument, the same as for the --shield subcommand.
Both the --shield and the --unshield commands will also finally output the number of tasks running in the shield and out of the @@ -674,7 +1009,7 @@ initialized.
For example if the original shield contained CPU0 and CPU1 in the system set and CPU2 and CPU3 in the user set, if you then issue the following command:
# cset shield --cpu=1,2,3
# cset shield --cpu=1,2,3
then that command will move CPU1 into the shielded "user" cpuset. Any processes or threads that were running on CPU1 that belonged to the unshielded "system" cpuset are migrated to CPU0 by the @@ -700,18 +1035,26 @@ and proc) directly.