Debian Codegraph @

doc/cset-set.txt

raw
1 cset-set(1)
2 ===========
3 Alex Tsariounov <[email protected]>
4 v1.6, December 2018
5
6 NAME
7 ----
8 cset-set - manage sets of cpus
9
10 SYNOPSIS
11 --------
12 [verse]
13 'cset' [cset options] 'set' [set options] [args]
14 'cset' set --help
15 'cset' set
16 'cset' set --recurse
17 'cset' set --list myset
18 'cset' set myset
19 'cset' set --recurse --list myset
20 'cset' set --cpu 2-5 --mem 0 --set newset
21 'cset' set --cpu 2-5 newset
22 'cset' set --cpu 1,2,5-7 another_set
23 'cset' set --destroy newset
24 'cset' set --destroy /mygroup_sets/my_set
25
26 OPTIONS
27 -------
28 -h, --help::
29 prints the list of options for this command
30
31 -l, --list::
32 list the named cpuset(s); if -r is used, will list recursively
33
34 -c CPUSPEC, --cpu=CPUSPEC::
35 create or modify cpuset in the specified cpuset with CPUSPEC
36 specification
37
38 -m MEMSPEC, --mem=MEMSPEC::
39 specify which memory nodes to assign to the created or modified
40 cpuset
41
42 -d, --destroy::
43 destroy specified cpuset
44
45 -s CPUSET, --set=CPUSET::
46 specify cpuset name to be acted on
47
48 -r, --recurse::
49 do recursive listing, for use with --list
50
51 -v, --verbose::
52 prints more detailed output, for the set command, using this flag
53 will not chop listing to fit in 80 columns
54
55 --cpu_exclusive::
56 mark this cpuset as owning its CPUs exclusively
57
58 --mem_exclusive::
59 mark this cpuset as owning its MEMs exclusively
60
61 DESCRIPTION
62 -----------
63 This command is used to create, modify, and destroy cpusets.
64 Cpusets form a tree-like structure rooted at the root cpuset
65 which always includes all system CPUs and all system memory
66 nodes.
67
68 A cpuset is an organizational unit that defines a group of CPUs
69 and a group of memory nodes where a process or thread (i.e. task)
70 is allowed to run on. For non-NUMA machines, the memory node is
71 always 0 (zero) and cannot be set to anything else. For NUMA
72 machines, the memory node can be set to a similar specification
73 as the CPU definition and will tie those memory nodes to that
74 cpuset. You will usually want the memory nodes that belong to
75 the CPUs defined to be in the same cpuset.
76
77 A cpuset can have exclusive right to the CPUs defined in it.
78 This means that only this cpuset can own these CPUs. Similarly,
79 a cpuset can have exclusive right to the memory nodes defined in
80 it. This means that only this cpuset can own these memory
81 nodes.
82
83 Cpusets can be specified by name or by path; however, care
84 should be taken when specifying by name if the name is not
85 unique. This tool will generally not let you do destructive
86 things to non-unique cpuset names.
87
88 Cpusets are uniquely specified by path. The path starts at where
89 the cpusets filesystem is mounted so you generally do not have to
90 know where that is. For example, so specify a cpuset that is
91 called "two" which is a subset of "one" which in turn is a subset
92 of the root cpuset, use the path "/one/two" regardless of where
93 the cpusets filesystem is mounted.
94
95 When specifying CPUs, a so-called CPUSPEC is used. The CPUSPEC
96 will accept a comma-separated list of CPUs and inclusive range
97 specifications. For example, --cpu=1,3,5-7 will assign CPU1,
98 CPU3, CPU5, CPU6, and CPU7 to the specified cpuset.
99
100 Note that cpusets follow certain rules. For example, children
101 can only include CPUs that the parents already have. If you do
102 not follow those rules, the kernel cpuset subsystem will not let
103 you create that cpuset. For example, if you create a cpuset that
104 contains CPU3, and then attempt to create a child of that cpuset
105 with a CPU other than 3, you will get an error, and the cpuset
106 will not be active. The error is somewhat cryptic in that it is
107 usually a "Permission denied" error.
108
109 Memory nodes are specified with a MEMSPEC in a similar way to
110 the CPUSPEC. For example, --mem=1,3-6 will assign MEM1, MEM3,
111 MEM4, MEM5, and MEM6 to the specified cpuset.
112
113 Note that if you attempt to create or modify a cpuset with a
114 memory node specification that is not valid, you may get a
115 cryptic error message, "No space left on device", and the
116 modification will not be allowed.
117
118 When you destroy a cpuset, then the tasks running in that set are
119 moved to the parent of that cpuset. If this is not what you
120 want, then manually move those tasks to the cpuset of your choice
121 with the 'cset proc' command (see 'cset proc --help' for more
122 information).
123
124 EXAMPLES
125 ~~~~~~~~
126
127 Create a cpuset with the default memory specification::
128
129 *+# cset set --cpu=2,4,6-8 --set=new_set+*
130
131 This command creates a cpuset called "new_set" located
132 off the root cpuset which holds CPUS 2,4,6,7,8 and node 0
133 (interleaved) memory. Note that --set is optional, and
134 you can just specify the name for the new cpuset after
135 all arguments.
136
137 Create a cpuset that specifies both CPUs and memory nodes::
138
139 *+# cset set --cpu=3 --mem=3 /rad/set_one+*
140
141 Note that this command uses the full path method to
142 specify the name of the new cpuset "/rad/set_one". It
143 also names the new cpuset implicitly (i.e. no --set
144 option, although you can use that if you want to). If
145 the "set_one" name is unique, you can subsequently refer
146 to is just by that. Memory node 3 is assigned to this
147 cpuset as well as CPU 3.
148
149 The above commands will create the new cpusets, or if they
150 already exist, they will modify them to the new specifications.
151
152 LICENSE
153 -------
154 Cpuset is licensed under the GNU GPL V2 only.
155
156 COPYRIGHT
157 ---------
158 Copyright (c) 2008-2011 Novell Inc.
159
160 AUTHOR
161 ------
162 Written by Alex Tsariounov <\[email protected]>.
163
164 SEE ALSO
165 --------
166 cset(1), cset-proc(1), cset-shield(1)
167
168 /usr/share/doc/packages/cpuset/html/tutorial.html
169
170 taskset(1), chrt(1)
171
172 /usr/src/linux/Documentation/cpusets.txt