Lines Matching +full:sub +full:- +full:groups
2 Control Groups
6 Documentation/admin-guide/cgroup-v1/cpusets.rst
12 Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
20 1. Control Groups
38 1. Control Groups
42 ----------------------
44 Control Groups provide a mechanism for aggregating/partitioning sets of
45 tasks, and all their future children, into hierarchical groups with
54 facilities provided by cgroups to treat groups of tasks in
56 schedules a resource or applies per-cgroup limits, but it may be
62 hierarchy, and a set of subsystems; each subsystem has system-specific
69 User-level code may create and destroy cgroups by name in an
79 access. For example, cpusets (see Documentation/admin-guide/cgroup-v1/cpusets.rst) allow
84 ----------------------------
87 Linux kernel, mainly for resource-tracking purposes. Such efforts
94 mechanisms required to efficiently implement such groups. It has
101 different subsystems - having parallel hierarchies allows each
113 university server with various users - students, professors, system
171 ---------------------------------
173 Control Groups extends the kernel as follows:
175 - Each task in the system has a reference-counted pointer to a
178 - A css_set contains a set of reference-counted pointers to
185 and in performance-critical code, whereas operations that require a
189 css_set->tasks.
191 - A cgroup hierarchy filesystem can be mounted for browsing and
194 - You can list all the tasks (by PID) attached to any cgroup.
197 into the rest of the kernel, none in performance-critical paths:
199 - in init/main.c, to initialize the root cgroups and initial
202 - in fork and exit, to attach and detach a task from its css_set.
207 comma-separated list of subsystems to mount as the filesystem mount
214 hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
220 error-recovery issues.
223 child cgroups created below the top-level cgroup, that hierarchy
227 No new system calls are added for cgroups - all support for
237 - tasks: list of tasks (by PID) attached to that cgroup. This list
240 - cgroup.procs: list of thread group IDs in the cgroup. This list is
245 - notify_on_release flag: run the release agent on exit?
246 - release_agent: the path to use for release notifications (this file
258 a large system into nested, dynamically changeable, "soft-partitions".
262 on a system into related sets of tasks. A task may be re-attached to
267 css_set pointer - if there's an already existing css_set with the
279 each css_set that references the cgroup, and sub-iterating over
287 ------------------------------------
303 ---------------------------------
310 --------------------------
315 1) mount -t tmpfs cgroup_root /sys/fs/cgroup
317 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
329 mount -t tmpfs cgroup_root /sys/fs/cgroup
331 mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset
335 /bin/echo 2-3 > cpuset.cpus
347 ---------------
354 # mount -t cgroup xxx /sys/fs/cgroup
369 # mount -t tmpfs cgroup_root /sys/fs/cgroup
375 # mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1
386 # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \
435 has processes attached, or is held alive by other subsystem-specific
439 -----------------------
472 --------------------------------
476 mounting a pre-existing hierarchy, in order to refer to it by name
480 The name should match [\w.-]+
495 ------------
504 - subsys_id: a unique array index for the subsystem, indicating which
505 entry in cgroup->subsys[] this subsystem should be managing.
507 - name: should be initialized to a unique subsystem name. Should be
510 - early_init: indicate if the subsystem needs early initialization
518 -------------------
532 - while holding cgroup_mutex
533 - while holding the task's alloc_lock (via task_lock())
534 - inside an rcu_read_lock() section via rcu_dereference()
537 -----------------
541 - add an entry in linux/cgroup_subsys.h
542 - define a cgroup_subsys object called <name>_cgrp_subsys
546 be successful no-ops.
556 larger subsystem-specific object), which will be initialized by the
568 subsystem may choose to fail creation by returning -errno. This
580 cgroup removal will proceed to the next step - css_free(). After this
588 is completely unused; @cgrp->parent is still valid. (Note - can also
589 be called for a newly-created cgroup if an error occurs after this
601 - it's guaranteed that all are from the same thread group
602 - @tset contains all tasks from the thread group whether or not
604 - the first task is the leader
631 A subsystem whose can_attach() has some side-effects should provide this
640 post-attachment activity that requires memory allocations or blocking.
660 the default hierarchy (which never has sub-cgroups) and a hierarchy
661 that is being created/destroyed (and hence has no sub-cgroups).
669 - Trusted (XATTR_TRUSTED)
670 - Security (XATTR_SECURITY)