diff options
Diffstat (limited to 'man7/cpuset.7')
-rw-r--r-- | man7/cpuset.7 | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/man7/cpuset.7 b/man7/cpuset.7 index 7ae130ebb..701f4d798 100644 --- a/man7/cpuset.7 +++ b/man7/cpuset.7 @@ -58,7 +58,7 @@ A process is confined to run only on the CPUs in the cpuset it belongs to, and to allocate memory only on the memory nodes in that cpuset. When a process -.BR fork (2)s, +.MR fork 2 s, the child process is placed in the same cpuset as its parent. With sufficient privilege, a process may be moved from one cpuset to another and the allowed CPUs and memory nodes @@ -73,11 +73,11 @@ under the control of the system administrator, and processes may be placed in these other cpusets. .P Cpusets are integrated with the -.BR sched_setaffinity (2) +.MR sched_setaffinity 2 scheduling affinity mechanism and the -.BR mbind (2) +.MR mbind 2 and -.BR set_mempolicy (2) +.MR set_mempolicy 2 memory-placement mechanisms in the kernel. Neither of these mechanisms let a process make use of a CPU or memory node that is not allowed by that process's cpuset. @@ -106,9 +106,9 @@ represents a cpuset and contains a fixed set of pseudo-files describing the state of that cpuset. .P New cpusets are created using the -.BR mkdir (2) +.MR mkdir 2 system call or the -.BR mkdir (1) +.MR mkdir 1 command. The properties of a cpuset, such as its flags, allowed CPUs and memory nodes, and attached processes, are queried and modified @@ -117,31 +117,31 @@ as listed below. .P The pseudo-files in each cpuset directory are automatically created when the cpuset is created, as a result of the -.BR mkdir (2) +.MR mkdir 2 invocation. It is not possible to directly add or remove these pseudo-files. .P A cpuset directory that contains no child cpuset directories, and has no attached processes, can be removed using -.BR rmdir (2) +.MR rmdir 2 or -.BR rmdir (1). +.MR rmdir 1 . It is not necessary, or possible, to remove the pseudo-files inside the directory before removing it. .P The pseudo-files in each cpuset directory are small text files that may be read and written using traditional shell utilities such as -.BR cat (1), +.MR cat 1 , and -.BR echo (1), +.MR echo 1 , or from a program by using file I/O library functions or system calls, such as -.BR open (2), -.BR read (2), -.BR write (2), +.MR open 2 , +.MR read 2 , +.MR write 2 , and -.BR close (2). +.MR close 2 . .P The pseudo-files in a cpuset directory represent internal kernel state and do not have any persistent image on disk. @@ -586,7 +586,7 @@ put those pages on the node where the process is running. .P The setting of these flags does not affect the data segment (see -.BR brk (2)) +.MR brk 2 ) or stack segment pages of a process. .P By default, both kinds of memory spreading are off and the kernel @@ -605,9 +605,9 @@ slab caches to ignore the process's NUMA memory policy and be spread instead. However, the effect of these changes in memory placement caused by cpuset-specified memory spreading is hidden from the -.BR mbind (2) +.MR mbind 2 or -.BR set_mempolicy (2) +.MR set_mempolicy 2 calls. These two NUMA memory policy calls always appear to behave as if no cpuset-specified memory spreading is in effect, even if it is. @@ -678,7 +678,7 @@ If one CPU is underutilized, the kernel will look for processes on other more overloaded CPUs and move those processes to the underutilized CPU, within the constraints of such placement mechanisms as cpusets and -.BR sched_setaffinity (2). +.MR sched_setaffinity 2 . .P The algorithmic cost of load balancing and its impact on key shared kernel data structures such as the process list increases more than @@ -721,7 +721,7 @@ it requests load balancing across all the CPUs in that cpuset's allowed CPUs, ensuring that load balancing can move a process (not otherwise pinned, as by -.BR sched_setaffinity (2)) +.MR sched_setaffinity 2 ) from any CPU in that cpuset to any other. .P When the per-cpuset flag @@ -767,7 +767,7 @@ balancing works to ensure that as many CPUs as possible are usefully employed running tasks. The kernel also performs periodic load balancing off the software clock described in -.BR time (7). +.MR time 7 . The setting of .I sched_relax_domain_level applies only to immediate load balancing. @@ -778,7 +778,7 @@ setting, periodic load balancing is attempted over all CPUs .IR sched_load_balance .) In any case, of course, tasks will be scheduled to run only on CPUs allowed by their cpuset, as modified by -.BR sched_setaffinity (2) +.MR sched_setaffinity 2 system calls. .P On small systems, such as those with just a few CPUs, immediate load @@ -955,7 +955,7 @@ other process in a cpuset. One process may not attach another to a cpuset unless it would have permission to send that process a signal (see -.BR kill (2)). +.MR kill 2 ). .P A process may create a child cpuset if it can access and write the parent cpuset directory. @@ -982,7 +982,7 @@ if either the process's current working directory is its cpuset (it first did a .B cd or -.BR chdir (2) +.MR chdir 2 to its cpuset directory beneath .IR /dev/cpuset , which is a bit unusual) @@ -1020,7 +1020,7 @@ command at the shell prompt to change the values of cpuset files, beware that the built-in .B echo command in some shells does not display an error message if the -.BR write (2) +.MR write 2 system call fails. .\" Gack! csh(1)'s echo does this For example, if the command: @@ -1039,7 +1039,7 @@ It is better to use the .B /bin/echo external command to change cpuset file settings, as this command will display -.BR write (2) +.MR write 2 errors, as in the example: .P .in +4n @@ -1082,7 +1082,7 @@ an interrupt lack any relevant process context, and are not confined by cpusets. .SS Renaming cpusets You can use the -.BR rename (2) +.MR rename 2 system call to rename cpusets. Only simple renaming is supported; that is, changing the name of a cpuset directory is permitted, but moving a directory into @@ -1100,27 +1100,27 @@ a failed cpuset call are as listed below. .TP .B E2BIG Attempted a -.BR write (2) +.MR write 2 on a special cpuset file with a length larger than some kernel-determined upper limit on the length of such writes. .TP .B EACCES Attempted to -.BR write (2) +.MR write 2 the process ID (PID) of a process to a cpuset .I tasks file when one lacks permission to move that process. .TP .B EACCES Attempted to add, using -.BR write (2), +.MR write 2 , a CPU or memory node to a cpuset, when that CPU or memory node was not already in its parent. .TP .B EACCES Attempted to set, using -.BR write (2), +.MR write 2 , .I cpuset.cpu_exclusive or .I cpuset.mem_exclusive @@ -1128,7 +1128,7 @@ on a cpuset whose parent lacks the same setting. .TP .B EACCES Attempted to -.BR write (2) +.MR write 2 a .I cpuset.memory_pressure file. @@ -1138,12 +1138,12 @@ Attempted to create a file in a cpuset directory. .TP .B EBUSY Attempted to remove, using -.BR rmdir (2), +.MR rmdir 2 , a cpuset with attached processes. .TP .B EBUSY Attempted to remove, using -.BR rmdir (2), +.MR rmdir 2 , a cpuset with child cpusets. .TP .B EBUSY @@ -1153,25 +1153,25 @@ that is also in a child of that cpuset. .TP .B EEXIST Attempted to create, using -.BR mkdir (2), +.MR mkdir 2 , a cpuset that already exists. .TP .B EEXIST Attempted to -.BR rename (2) +.MR rename 2 a cpuset to a name that already exists. .TP .B EFAULT Attempted to -.BR read (2) +.MR read 2 or -.BR write (2) +.MR write 2 a cpuset file using a buffer that is outside the writing processes accessible address space. .TP .B EINVAL Attempted to change a cpuset, using -.BR write (2), +.MR write 2 , in a way that would violate a .I cpu_exclusive or @@ -1180,7 +1180,7 @@ attribute of that cpuset or any of its siblings. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 an empty .I cpuset.cpus or @@ -1189,7 +1189,7 @@ list to a cpuset which has attached processes or child cpusets. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 a .I cpuset.cpus or @@ -1199,7 +1199,7 @@ the first number. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 a .I cpuset.cpus or @@ -1208,28 +1208,28 @@ list which included an invalid character in the string. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 a list to a .I cpuset.cpus file that did not include any online CPUs. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 a list to a .I cpuset.mems file that did not include any online memory nodes. .TP .B EINVAL Attempted to -.BR write (2) +.MR write 2 a list to a .I cpuset.mems file that included a node that held no memory. .TP .B EIO Attempted to -.BR write (2) +.MR write 2 a string to a cpuset .I tasks file that @@ -1237,43 +1237,43 @@ does not begin with an ASCII decimal integer. .TP .B EIO Attempted to -.BR rename (2) +.MR rename 2 a cpuset into a different directory. .TP .B ENAMETOOLONG Attempted to -.BR read (2) +.MR read 2 a .IR /proc/ pid /cpuset file for a cpuset path that is longer than the kernel page size. .TP .B ENAMETOOLONG Attempted to create, using -.BR mkdir (2), +.MR mkdir 2 , a cpuset whose base directory name is longer than 255 characters. .TP .B ENAMETOOLONG Attempted to create, using -.BR mkdir (2), +.MR mkdir 2 , a cpuset whose full pathname, including the mount point (typically "/dev/cpuset/") prefix, is longer than 4095 characters. .TP .B ENODEV The cpuset was removed by another process at the same time as a -.BR write (2) +.MR write 2 was attempted on one of the pseudo-files in the cpuset directory. .TP .B ENOENT Attempted to create, using -.BR mkdir (2), +.MR mkdir 2 , a cpuset in a parent cpuset that doesn't exist. .TP .B ENOENT Attempted to -.BR access (2) +.MR access 2 or -.BR open (2) +.MR open 2 a nonexistent file in a cpuset directory. .TP .B ENOMEM @@ -1283,7 +1283,7 @@ system is extremely short of memory. .TP .B ENOSPC Attempted to -.BR write (2) +.MR write 2 the process ID (PID) of a process to a cpuset .I tasks @@ -1295,7 +1295,7 @@ setting. .TP .B ENOSPC Attempted to -.BR write (2) +.MR write 2 an empty .I cpuset.cpus or @@ -1305,7 +1305,7 @@ has tasks attached. .TP .B ENOTDIR Attempted to -.BR rename (2) +.MR rename 2 a nonexistent cpuset. .TP .B EPERM @@ -1321,7 +1321,7 @@ to set in its bit masks. .TP .B ESRCH Attempted to -.BR write (2) +.MR write 2 the process ID (PID) of a nonexistent process to a cpuset .I tasks file. @@ -1336,7 +1336,7 @@ parameter is actually a thread ID, and each thread in a threaded group can be attached to a different cpuset. The value returned from a call to -.BR gettid (2) +.MR gettid 2 can be passed in the argument .IR pid . .\" ================== BUGS ================== @@ -1344,13 +1344,13 @@ can be passed in the argument .I cpuset.memory_pressure cpuset files can be opened for writing, creation, or truncation, but then the -.BR write (2) +.MR write 2 fails with .I errno set to .BR EACCES , and the creation and truncation options on -.BR open (2) +.MR open 2 have no effect. .\" ================== EXAMPLES ================== .SH EXAMPLES @@ -1367,7 +1367,7 @@ mkdir /dev/cpuset (if not already done) mount \-t cpuset none /dev/cpuset (if not already done) .IP (3) Create the new cpuset using -.BR mkdir (1). +.MR mkdir 1 . .IP (4) Assign CPUs and memory nodes to the new cpuset. .IP (5) @@ -1457,7 +1457,7 @@ Notice that the last step of the above sequence did not do: The .I while loop, rather than the seemingly easier use of the -.BR cp (1) +.MR cp 1 command, was necessary because only one process PID at a time may be written to the .I tasks @@ -1469,7 +1469,7 @@ loop can be accomplished more efficiently, in fewer keystrokes and in syntax that works on any shell, but alas more obscurely, by using the .B \-u (unbuffered) option of -.BR sed (1): +.MR sed 1 : .P .in +4n .EX @@ -1478,21 +1478,21 @@ syntax that works on any shell, but alas more obscurely, by using the .in .\" ================== SEE ALSO ================== .SH SEE ALSO -.BR taskset (1), -.BR get_mempolicy (2), -.BR getcpu (2), -.BR mbind (2), -.BR sched_getaffinity (2), -.BR sched_setaffinity (2), -.BR sched_setscheduler (2), -.BR set_mempolicy (2), -.BR CPU_SET (3), -.BR proc (5), -.BR cgroups (7), -.BR numa (7), -.BR sched (7), -.BR migratepages (8), -.BR numactl (8) +.MR taskset 1 , +.MR get_mempolicy 2 , +.MR getcpu 2 , +.MR mbind 2 , +.MR sched_getaffinity 2 , +.MR sched_setaffinity 2 , +.MR sched_setscheduler 2 , +.MR set_mempolicy 2 , +.MR CPU_SET 3 , +.MR proc 5 , +.MR cgroups 7 , +.MR numa 7 , +.MR sched 7 , +.MR migratepages 8 , +.MR numactl 8 .P .I Documentation/admin\-guide/cgroup\-v1/cpusets.rst in the Linux kernel source tree |