userfaultfd.2: Add Linux container migration use-case to NOTES
[man-pages.git] / man7 / cgroups.7
blobbd0d2823dc2908790bf3a7a4216eba86f88f3d2a
1 .\" Copyright (C) 2015 Serge Hallyn <serge@hallyn.com>
2 .\" and Copyright (C) 2016 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .TH CGROUPS 7 2016-12-12 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 cgroups \- Linux control groups
29 .SH DESCRIPTION
30 Control cgroups, usually referred to as cgroups,
31 are a Linux kernel feature which allow processes to
32 be organized into hierarchical groups whose usage of
33 various types of resources can then be limited and monitored.
34 The kernel's cgroup interface is provided through
35 a pseudo-filesystem called cgroupfs.
36 Grouping is implemented in the core cgroup kernel code,
37 while resource tracking and limits are implemented in
38 a set of per-resource-type subsystems (memory, CPU, and so on).
39 .\"
40 .SS Terminology
42 .I cgroup
43 is a collection of processes that are bound to a set of
44 limits or parameters defined via the cgroup filesystem.
47 .I subsystem
48 is a kernel component that modifies the behavior of
49 the processes in a cgroup.
50 Various subsystems have been implemented, making it possible to do things
51 such as limiting the amount of CPU time and memory available to a cgroup,
52 accounting for the CPU time used by a cgroup,
53 and freezing and resuming execution of the processes in a cgroup.
54 Subsystems are sometimes also known as
55 .IR "resource controllers"
56 (or simply, controllers).
58 The cgroups for a controller are arranged in a
59 .IR hierarchy .
60 This hierarchy is defined by creating, removing, and
61 renaming subdirectories within the cgroup filesystem.
62 At each level of the hierarchy, attributes (e.g., limits) can be defined.
63 The limits, control, and accounting provided by cgroups generally have
64 effect throughout the subhierarchy underneath the cgroup where the
65 attributes are defined.
66 Thus, for example, the limits placed on
67 a cgroup at a higher level in the hierarchy cannot be exceeded
68 by descendant cgroups.
69 .\"
70 .SS Cgroups version 1 and version 2
71 The initial release of the cgroups implementation was in Linux 2.6.24.
72 Over time, various cgroup controllers have been added
73 to allow the management of various types of resources.
74 However, the development of these controllers was largely uncoordinated,
75 with the result that many inconsistencies arose between controllers
76 and management of the cgroup hierarchies became rather complex.
77 (A longer description of these problems can be found in
78 the kernel source file
79 .IR Documentation/cgroup\-v2.txt .)
81 Because of the problems with the initial cgroups implementation
82 (cgroups version 1),
83 starting in Linux 3.10, work began on a new,
84 orthogonal implementation to remedy these problems.
85 Initially marked experimental, and hidden behind the
86 .I "\-o\ __DEVEL__sane_behavior"
87 mount option, the new version (cgroups version 2)
88 was eventually made official with the release of Linux 4.5.
89 Differences between the two versions are described in the text below.
91 Although cgroups v2 is intended as a replacement for cgroups v1,
92 the older system continues to exist
93 (and for compatibility reasons is unlikely to be removed).
94 Currently, cgroups v2 implements only a subset of the controllers
95 available in cgroups v1.
96 The two systems are implemented so that both v1 controllers and
97 v2 controllers can be mounted on the same system.
98 Thus, for example, it is possible to use those controllers
99 that are supported under version 2,
100 while also using version 1 controllers
101 where version 2 does not yet support those controllers.
102 The only restriction here is that a controller can't be simultaneously
103 employed in both a cgroups v1 hierarchy and in the cgroups v2 hierarchy.
105 .SS Cgroups version 1
106 Under cgroups v1, each controller may be mounted against a separate
107 cgroup filesystem that provides its own hierarchical organization of the
108 processes on the system.
109 It is also possible comount multiple (or even all) cgroups v1 controllers
110 against the same cgroup filesystem, meaning that the comounted controllers
111 manage the same hierarchical organization of processes.
113 For each mounted hierarchy,
114 the directory tree mirrors the control group hierarchy.
115 Each control group is represented by a directory, with each of its child
116 control cgroups represented as a child directory.
117 For instance,
118 .IR /user/joe/1.session
119 represents control group
120 .IR 1.session ,
121 which is a child of cgroup
122 .IR joe ,
123 which is a child of
124 .IR /user .
125 Under each cgroup directory is a set of files which can be read or
126 written to, reflecting resource limits and a few general cgroup
127 properties.
129 In addition, in cgroups v1,
130 cgroups can be mounted with no bound controller, in which case
131 they serve only to track processes.
132 (See the discussion of release notification below.)
133 An example of this is the
134 .I name=systemd
135 cgroup which is used by
136 .BR systemd (1)
137 to track services and user sessions.
139 .SS Tasks (threads) versus processes
140 In cgroups v1, a distinction is drawn between
141 .I processes
143 .IR tasks .
144 In this view, a process can consist of multiple tasks
145 (more commonly called threads, from a user-space perspective,
146 and called such in the remainder of this man page).
147 In cgroups v1, it is possible to independently manipulate
148 the cgroup memberships of the threads in a process.
149 Because this ability caused certain problems,
150 .\" FIXME Add some text describing why this was a problem.
151 the ability to independently manipulate the cgroup memberships
152 of the threads in a process has been removed in cgroups v2.
153 Cgroups v2 allows manipulation of cgroup membership only for processes
154 (which has the effect of changing the cgroup membership of
155 all threads in the process).
157 .SS Mounting v1 controllers
158 The use of cgroups requires a kernel built with the
159 .BR CONFIG_CGROUP
160 option.
161 In addition, each of the v1 controllers has an associated
162 configuration option that must be set in order to employ that controller.
164 In order to use a v1 controller,
165 it must be mounted against a cgroup filesystem.
166 The usual place for such mounts is under a
167 .BR tmpfs (5)
168 filesystem mounted at
169 .IR /sys/fs/cgroup .
170 Thus, one might mount the
171 .I cpu
172 controller as follows:
175 .in +4n
176 mount \-t cgroup \-o cpu none /sys/fs/cgroup/cpu
180 It is possible to comount multiple controllers against the same hierarchy.
181 For example, here the
182 .IR cpu
184 .IR cpuacct
185 controllers are comounted against a single hierarchy:
188 .in +4n
189 mount \-t cgroup \-o cpu,cpuacct none /sys/fs/cgroup/cpu,cpuacct
193 Comounting controllers has the effect that a process is in the same cgroup for
194 all of the comounted controllers.
195 Separately mounting controllers allows a process to
196 be in cgroup
197 .I /foo1
198 for one controller while being in
199 .I /foo2/foo3
200 for another.
202 It is possible to comount all v1 controllers against the same hierarchy:
205 .in +4n
206 mount \-t cgroup \-o all cgroup /sys/fs/cgroup
210 (One can achieve the same result by omitting
211 .IR "\-o all" ,
212 since it is the default if no controllers are explicitly specified.)
214 It is not possible to mount the same controller
215 against multiple cgroup hierarchies.
216 For example, it is not possible to mount both the
217 .I cpu
219 .I cpuacct
220 controllers against one hierarchy, and to mount the
221 .I cpu
222 controller alone against another hierarchy.
223 It is possible to create multiple mount points with exactly
224 the same set of comounted controllers.
225 However, in this case all that results is multiple mount points
226 providing a view of the same hierarchy.
228 Note that on many systems, the v1 controllers are automatically mounted under
229 .IR /sys/fs/cgroup ;
230 in particular,
231 .BR systemd (1)
232 automatically creates such mount points.
234 .SS Cgroups version 1 controllers
235 Each of the cgroups version 1 controllers is governed
236 by a kernel configuration option (listed below).
237 Additionally, the availability of the cgroups feature is governed by the
238 .BR CONFIG_CGROUPS
239 kernel configuration option.
241 .IR cpu " (since Linux 2.6.24; " \fBCONFIG_CGROUP_SCHED\fP )
242 Cgroups can be guaranteed a minimum number of "CPU shares"
243 when a system is busy.
244 This does not limit a cgroup's CPU usage if the CPUs are not busy.
245 For further information, see
246 .IR Documentation/scheduler/sched-design-CFS.txt .
248 In Linux 3.2,
249 this controller was extended to provide CPU "bandwidth" control.
250 If the kernel is configured with
251 .BR CONFIG_CFS_BANDWIDTH ,
252 then within each scheduling period
253 (defined via a file in the cgroup directory), it is possible to define
254 an upper limit on the CPU time allocated to the processes in a cgroup.
255 This upper limit applies even if there is no other competition for the CPU.
256 Further information can be found in the kernel source file
257 .IR Documentation/scheduler/sched\-bwc.txt .
259 .IR cpuacct " (since Linux 2.6.24; " \fBCONFIG_CGROUP_CPUACCT\fP )
260 This provides accounting for CPU usage by groups of processes.
262 Further information can be found in the kernel source file
263 .IR Documentation/cgroup\-v1/cpuacct.txt .
265 .IR cpuset " (since Linux 2.6.24; " \fBCONFIG_CPUSETS\fP )
266 This cgroup can be used to bind the processes in a cgroup to
267 a specified set of CPUs and NUMA nodes.
269 Further information can be found in the kernel source file
270 .IR Documentation/cgroup\-v1/cpusets.txt .
272 .IR memory " (since Linux 2.6.25; " \fBCONFIG_MEMCG\fP )
273 The memory controller supports reporting and limiting of process memory, kernel
274 memory, and swap used by cgroups.
276 Further information can be found in the kernel source file
277 .IR Documentation/cgroup\-v1/memory.txt .
279 .IR devices " (since Linux 2.6.26; " \fBCONFIG_CGROUP_DEVICE\fP )
280 This supports controlling which processes may create (mknod) devices as
281 well as open them for reading or writing.
282 The policies may be specified as whitelists and blacklists.
283 Hierarchy is enforced, so new rules must not
284 violate existing rules for the target or ancestor cgroups.
286 Further information can be found in the kernel source file
287 .IR Documentation/cgroup-v1/devices.txt .
289 .IR freezer " (since Linux 2.6.28; " \fBCONFIG_CGROUP_FREEZER\fP )
291 .IR freezer
292 cgroup can suspend and restore (resume) all processes in a cgroup.
293 Freezing a cgroup
294 .I /A
295 also causes its children, for example, processes in
296 .IR /A/B ,
297 to be frozen.
299 Further information can be found in the kernel source file
300 .IR Documentation/cgroup-v1/freezer-subsystem.txt .
302 .IR net_cls " (since Linux 2.6.29; " \fBCONFIG_CGROUP_NET_CLASSID\fP )
303 This places a classid, specified for the cgroup, on network packets
304 created by a cgroup.
305 These classids can then be used in firewall rules,
306 as well as used to shape traffic using
307 .BR tc (8).
308 This applies only to packets
309 leaving the cgroup, not to traffic arriving at the cgroup.
311 Further information can be found in the kernel source file
312 .IR Documentation/cgroup-v1/net_cls.txt .
314 .IR blkio " (since Linux 2.6.33; " \fBCONFIG_BLK_CGROUP\fP )
316 .I blkio
317 cgroup controls and limits access to specified block devices by
318 applying IO control in the form of throttling and upper limits against leaf
319 nodes and intermediate nodes in the storage hierarchy.
321 Two policies are available.
322 The first is a proportional-weight time-based division
323 of disk implemented with CFQ.
324 This is in effect for leaf nodes using CFQ.
325 The second is a throttling policy which specifies
326 upper I/O rate limits on a device.
328 Further information can be found in the kernel source file
329 .IR Documentation/cgroup-v1/blkio-controller.txt .
331 .IR perf_event " (since Linux 2.6.39; " \fBCONFIG_CGROUP_PERF\fP )
332 This controller allows
333 .I perf
334 monitoring of the set of processes grouped in a cgroup.
336 Further information can be found in the kernel source file
337 .IR tools/perf/Documentation/perf-record.txt .
339 .IR net_prio " (since Linux 3.3; " \fBCONFIG_CGROUP_NET_PRIO\fP )
340 This allows priorities to be specified, per network interface, for cgroups.
342 Further information can be found in the kernel source file
343 .IR Documentation/cgroup-v1/net_prio.txt .
345 .IR hugetlb " (since Linux 3.5; " \fBCONFIG_CGROUP_HUGETLB\fP )
346 This supports limiting the use of huge pages by cgroups.
348 Further information can be found in the kernel source file
349 .IR Documentation/cgroup-v1/hugetlb.txt .
351 .IR pids " (since Linux 4.3; " \fBCONFIG_CGROUP_PIDS\fP )
352 This controller permits limiting the number of process that may be created
353 in a cgroup (and its descendants).
355 Further information can be found in the kernel source file
356 .IR Documentation/cgroup-v1/pids.txt .
358 .SS Creating cgroups and moving processes
359 A cgroup filesystem initially contains a single root cgroup, '/',
360 which all processes belong to.
361 A new cgroup is created by creating a directory in the cgroup filesystem:
363     mkdir /sys/fs/cgroup/cpu/cg1
365 This creates a new empty cgroup.
367 A process may be moved to this cgroup by writing its PID into the cgroup's
368 .I cgroup.procs
369 file:
371     echo $$ > /sys/fs/cgroup/cpu/cg1/cgroup.procs
373 Only one PID at a time should be written to this file.
375 Writing the value 0 to a
376 .IR cgroup.procs
377 file causes the writing process to be moved to the corresponding cgroup.
379 When writing a PID into the
380 .IR cgroup.procs ,
381 all threads in the process are moved into the new cgroup at once.
383 Within a hierarchy, a process can be a member of exactly one cgroup.
384 Writing a process's PID to a
385 .IR cgroup.procs
386 file automatically removes it from the cgroup of
387 which it was previously a member.
390 .I cgroup.procs
391 file can be read to obtain a list of the processes that are
392 members of a cgroup.
393 The returned list of PIDs is not guaranteed to be in order.
394 Nor is it guaranteed to be free of duplicates.
395 (For example, a PID may be recycled while reading from the list.)
397 In cgroups v1 (but not cgroups v2), an individual thread can be moved to
398 another cgroup by writing its thread ID
399 (i.e., the kernel thread ID returned by
400 .BR clone (2)
402 .BR gettid (2))
403 to the
404 .IR tasks
405 file in a cgroup directory.
406 This file can be read to discover the set of threads
407 that are members of the cgroup.
408 This file is not present in cgroup v2 directories.
410 .SS Removing cgroups
411 To remove a cgroup,
412 it must first have no child cgroups and contain no (nonzombie) processes.
413 So long as that is the case, one can simply
414 remove the corresponding directory pathname.
415 Note that files in a cgroup directory cannot and need not be
416 removed.
418 .SS Cgroups v1 release notification
419 Two files can be used to determine whether the kernel provides
420 notifications when a cgroup becomes empty.
421 A cgroup is considered to be empty when it contains no child
422 cgroups and no member processes.
424 A special file in the root directory of each cgroup hierarchy,
425 .IR release_agent ,
426 can be used to register the pathname of a program that may be invoked when
427 a cgroup in the hierarchy becomes empty.
428 The pathname of the newly empty cgroup (relative to the cgroup mount point)
429 is provided as the sole command-line argument when the
430 .IR release_agent
431 program is invoked.
433 .IR release_agent
434 program might remove the cgroup directory,
435 or perhaps repopulate with a process.
437 The default value of the
438 .IR release_agent
439 file is empty, meaning that no release agent is invoked.
441 Whether or not the
442 .IR release_agent
443 program is invoked when a particular cgroup becomes empty is determined
444 by the value in the
445 .IR notify_on_release
446 file in the corresponding cgroup directory.
447 If this file contains the value 0, then the
448 .IR release_agent
449 program is not invoked.
450 If it contains the value 1, the
451 .IR release_agent
452 program is invoked.
453 The default value for this file in the root cgroup is 0.
454 At the time when a new cgroup is created,
455 the value in this file is inherited from the corresponding file
456 in the parent cgroup.
458 .SS Cgroups version 2
459 In cgroups v2,
460 all mounted controllers reside in a single unified hierarchy.
461 While (different) controllers may be simultaneously
462 mounted under the v1 and v2 hierarchies,
463 it is not possible to mount the same controller simultaneously
464 under both the v1 and the v2 hierarchies.
466 The new behaviors in cgroups v2 are summarized here,
467 and in some cases elaborated in the following subsections.
468 .IP 1. 3
469 Cgroups v2 provides a unified hierarchy against
470 which all controllers are mounted.
471 .IP 2.
472 "Internal" processes are not permitted.
473 With the exception of the root cgroup, processes may reside
474 only in leaf nodes (cgroups that do not themselves contain child cgroups).
475 .IP 3.
476 Active cgroups must be specified via the files
477 .IR cgroup.controllers
479 .IR cgroup.subtree_control .
480 .IP 4.
482 .I tasks
483 file has been removed.
484 In addition, the
485 .I cgroup.clone_children
486 file that is employed by the
487 .I cpuset
488 controller has been removed.
489 .IP 5.
490 An improved mechanism for notification of empty cgroups is provided by the
491 .IR cgroup.events
492 file.
494 For more changes, see the
495 .I Documentation/cgroup-v2.txt
496 file in the kernel source.
498 .SS Cgroups v2 unified hierarchy
499 In cgroups v1, the ability to mount different controllers
500 against different hierarchies was intended to allow great flexibility
501 for application design.
502 In practice, though, the flexibility turned out to less useful than expected,
503 and in many cases added complexity.
504 Therefore, in cgroups v2,
505 all available controllers are mounted against a single hierarchy.
506 The available controllers are automatically mounted,
507 meaning that it is not necessary (or possible) to specify the controllers
508 when mounting the cgroup v2 filesystem using a command such as the following:
510     mount -t cgroup2 none /mnt/cgroup2
512 A cgroup v2 controller is available only if it is not currently in use
513 via a mount against a cgroup v1 hierarchy.
514 Or, to put things another way, it is not possible to employ
515 the same controller against both a v1 hierarchy and the unified v2 hierarchy.
517 .SS Cgroups v2 """no internal processes""" rule
518 With the exception of the root cgroup, processes may reside
519 only in leaf nodes (cgroups that do not themselves contain child cgroups).
520 This avoids the need to decide how to partition resources between
521 processes which are members of cgroup A and processes in child cgroups of A.
523 For instance, if cgroup
524 .I /cg1/cg2
525 exists, then a process may reside in
526 .IR /cg1/cg2 ,
527 but not in
528 .IR /cg1 .
529 This is to avoid an ambiguity in cgroups v1
530 with respect to the delegation of resources between processes in
531 .I /cg1
532 and its child cgroups.
533 The recommended approach in cgroups v2 is to create a subdirectory called
534 .I leaf
535 for any nonleaf cgroup which should contain processes, but no child cgroups.
536 Thus, processes which previously would have gone into
537 .I /cg1
538 would now go into
539 .IR /cg1/leaf .
540 This has the advantage of making explicit
541 the relationship between processes in
542 .I /cg1/leaf
544 .IR /cg1 's
545 other children.
547 .SS Cgroups v2 subtree control
548 When a cgroup
549 .I A/b
550 is created, its
551 .IR cgroup.controllers
552 file contains the list of controllers which were active in its parent, A.
553 This is the list of controllers which are available to this cgroup.
554 No controllers are active until they are enabled through the
555 .IR cgroup.subtree_control
556 file, by writing the list of space-delimited names of the controllers,
557 each preceded by '+' (to enable) or '\-' (to disable).
558 If the
559 .I freezer
560 controller is not enabled in
561 .IR /A/B ,
562 then it cannot be enabled in
563 .IR /A/B/C .
565 .SS Cgroups v2 cgroup.events file
566 With cgroups v2, a new mechanism is provided to obtain notification
567 about when a cgroup becomes empty.
568 The cgroups v1
569 .IR release_agent
571 .IR notify_on_release
572 files are removed, and replaced by a new, more general-purpose file,
573 .IR cgroup.events .
574 This file contains key-value pairs
575 (delimited by newline characters, with the key and value separated by spaces)
576 that identify events or state for a cgroup.
577 Currently, only one key appears in this file,
578 .IR populated ,
579 which has either the value 0,
580 meaning that the cgroup (and its descendants)
581 contain no (nonzombie) processes,
582 or 1, meaning that the cgroup contains member processes.
585 .IR cgroup.events
586 file can be monitored, in order to receive notification when a cgroup
587 transitions between the populated and unpopulated states (or vice versa).
588 When monitoring this file using
589 .BR inotify (7),
590 transitions generate
591 .BR IN_MODIFY
592 events, and when monitoring the file using
593 .BR poll (2),
594 transitions generate
595 .B POLLPRI
596 events.
598 The cgroups v2
599 .IR notify_on_release
600 mechanism offers at least two advantages over the cgroups v1
601 .IR release_agent
602 mechanism.
603 First, it allows for cheaper notification,
604 since a single process can monitor multiple
605 .IR cgroup.events
606 files.
607 By contrast, the cgroups v1 mechanism requires the creation
608 of a process for each notification.
609 Second, notification can be delegated to a process that lives inside
610 a container associated with the newly empty cgroup.
612 .SS /proc files
614 .IR /proc/cgroups " (since Linux 2.6.24)"
615 This file contains information about the controllers
616 that are compiled into the kernel.
617 An example of the contents of this file (reformatted for readability)
618 is the following:
621 .in +4n
622 #subsys_name    hierarchy      num_cgroups    enabled
623 cpuset          4              1              1
624 cpu             8              1              1
625 cpuacct         8              1              1
626 blkio           6              1              1
627 memory          3              1              1
628 devices         10             84             1
629 freezer         7              1              1
630 net_cls         9              1              1
631 perf_event      5              1              1
632 net_prio        9              1              1
633 hugetlb         0              1              0
634 pids            2              1              1
638 The fields in this file are, from left to right:
640 .IP 1. 3
641 The name of the controller.
642 .IP 2.
643 The unique ID of the cgroup hierarchy on which this controller is mounted.
644 If multiple cgroups v1 controllers are bound to the same hierarchy,
645 then each will show the same hierarchy ID in this field.
646 The value in this field will be 0 if:
647 .RS 5
648 .IP a) 3
649 the controller is not mounted on a cgroups v1 hierarchy;
650 .IP b)
651 the controller is bound to the cgroups v2 single unified hierarchy; or
652 .IP c)
653 the controller is disabled (see below).
655 .IP 3.
656 The number of control groups in this hierarchy using this controller.
657 .IP 4.
658 This field contains the value 1 if this controller is enabled,
659 or 0 if it has been disabled (via the
660 .IR cgroup_disable
661 kernel command-line boot parameter).
664 .IR /proc/[pid]/cgroup " (since Linux 2.6.24)"
665 This file describes control groups to which the process
666 with the corresponding PID belongs.
667 The displayed information differs for
668 cgroups version 1 and version 2 hierarchies.
670 For each cgroup hierarchy of which the process is a member,
671 there is one entry containing three
672 colon-separated fields of the form:
674      hierarchy-ID:controller-list:cgroup-path
676 For example:
678 .ft CW
680     5:cpuacct,cpu,cpuset:/daemons
684 The colon-separated fields are, from left to right:
686 .IP 1. 3
687 For cgroups version 1 hierarchies,
688 this field contains a unique hierarchy ID number
689 that can be matched to a hierarchy ID in
690 .IR /proc/cgroups .
691 For the cgroups version 2 hierarchy, this field contains the value 0.
692 .IP 2.
693 For cgroups version 1 hierarchies,
694 this field contains a comma-separated list of the controllers
695 bound to the hierarchy.
696 For the cgroups version 2 hierarchy, this field is empty.
697 .IP 3.
698 This field contains the pathname of the control group in the hierarchy
699 to which the process belongs.
700 This pathname is relative to the mount point of the hierarchy.
702 .SH ERRORS
703 The following errors can occur for
704 .BR mount (2):
706 .B EBUSY
707 An attempt to mount a cgroup version 1 filesystem specified neither the
708 .I name=
709 option (to mount a named hierarchy) nor a controller name (or
710 .IR all ).
711 .SH NOTES
712 A child process created via
713 .BR fork (2)
714 inherits its parent's cgroup memberships.
715 A process's cgroup memberships are preserved across
716 .BR execve (2).
717 .SH SEE ALSO
718 .BR prlimit (1),
719 .BR systemd (1),
720 .BR clone (2),
721 .BR ioprio_set (2),
722 .BR perf_event_open (2),
723 .BR setrlimit (2),
724 .BR cgroup_namespaces (7),
725 .BR cpuset (7),
726 .BR namespaces (7),
727 .BR sched (7),
728 .BR user_namespaces (7)