Lines Matching +full:resource +full:- +full:files

6 Documentation/admin-guide/cgroup-v1/cpusets.rst
12 Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
42 ----------------------
55 particular ways. A subsystem is typically a "resource controller" that
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
83 .. _cgroups-why-needed:
86 ----------------------------
89 Linux kernel, mainly for resource-tracking purposes. Such efforts
103 different subsystems - having parallel hierarchies allows each
109 At one extreme, each resource controller or subsystem could be in a
115 university server with various users - students, professors, system
116 tasks etc. The resource planning for this server could be along the
143 (by putting those resource subsystems in different hierarchies),
151 appropriate network and other resource class. This may lead to
159 With ability to write PIDs directly to resource classes, it's just a
168 new resource classes.
173 ---------------------------------
177 - Each task in the system has a reference-counted pointer to a
180 - A css_set contains a set of reference-counted pointers to
187 and in performance-critical code, whereas operations that require a
191 css_set->tasks.
193 - A cgroup hierarchy filesystem can be mounted for browsing and
196 - You can list all the tasks (by PID) attached to any cgroup.
199 into the rest of the kernel, none in performance-critical paths:
201 - in init/main.c, to initialize the root cgroups and initial
204 - in fork and exit, to attach and detach a task from its css_set.
209 comma-separated list of subsystems to mount as the filesystem mount
216 hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
222 error-recovery issues.
225 child cgroups created below the top-level cgroup, that hierarchy
229 No new system calls are added for cgroups - all support for
237 containing the following files describing that cgroup:
239 - tasks: list of tasks (by PID) attached to that cgroup. This list
242 - cgroup.procs: list of thread group IDs in the cgroup. This list is
247 - notify_on_release flag: run the release agent on exit?
248 - release_agent: the path to use for release notifications (this file
251 Other subsystems such as cpusets may add additional files in each
260 a large system into nested, dynamically changeable, "soft-partitions".
264 on a system into related sets of tasks. A task may be re-attached to
269 css_set pointer - if there's an already existing css_set with the
281 each css_set that references the cgroup, and sub-iterating over
289 ------------------------------------
305 ---------------------------------
312 --------------------------
317 1) mount -t tmpfs cgroup_root /sys/fs/cgroup
319 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
331 mount -t tmpfs cgroup_root /sys/fs/cgroup
333 mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset
337 /bin/echo 2-3 > cpuset.cpus
349 ---------------
356 # mount -t cgroup xxx /sys/fs/cgroup
362 if cpusets are enabled the user will have to populate the cpus and mems files
366 different hierarchies of cgroups for each single resource or group of
368 /sys/fs/cgroup and create directories for each cgroup resource or resource
371 # mount -t tmpfs cgroup_root /sys/fs/cgroup
377 # mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1
388 # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \
417 In this directory you can find several files::
421 (plus whatever files added by the attached subsystems)
437 has processes attached, or is held alive by other subsystem-specific
441 -----------------------
474 --------------------------------
478 mounting a pre-existing hierarchy, in order to refer to it by name
482 The name should match [\w.-]+
497 ------------
506 - subsys_id: a unique array index for the subsystem, indicating which
507 entry in cgroup->subsys[] this subsystem should be managing.
509 - name: should be initialized to a unique subsystem name. Should be
512 - early_init: indicate if the subsystem needs early initialization
520 -------------------
534 - while holding cgroup_mutex
535 - while holding the task's alloc_lock (via task_lock())
536 - inside an rcu_read_lock() section via rcu_dereference()
539 -----------------
543 - add an entry in linux/cgroup_subsys.h
544 - define a cgroup_subsys object called <name>_cgrp_subsys
548 be successful no-ops.
558 larger subsystem-specific object), which will be initialized by the
570 subsystem may choose to fail creation by returning -errno. This
582 cgroup removal will proceed to the next step - css_free(). After this
590 is completely unused; @cgrp->parent is still valid. (Note - can also
591 be called for a newly-created cgroup if an error occurs after this
603 - it's guaranteed that all are from the same thread group
604 - @tset contains all tasks from the thread group whether or not
606 - the first task is the leader
623 removing the associated interface files and invokes this callback so
625 This prevents unexpected resource control from a hidden css and
633 A subsystem whose can_attach() has some side-effects should provide this
642 post-attachment activity that requires memory allocations or blocking.
662 the default hierarchy (which never has sub-cgroups) and a hierarchy
663 that is being created/destroyed (and hence has no sub-cgroups).
669 directories and files. The current supported types are:
671 - Trusted (XATTR_TRUSTED)
672 - Security (XATTR_SECURITY)