···99conventions of cgroup v2. It describes all userland-visible aspects1010of cgroup including core and specific controller behaviors. All1111future changes must be reflected in this document. Documentation for1212-v1 is available under Documentation/cgroup-v1/.1212+v1 is available under Documentation/admin-guide/cgroup-v1/.13131414.. CONTENTS1515
···4089408940904090 relax_domain_level=40914091 [KNL, SMP] Set scheduler's default relax_domain_level.40924092- See Documentation/cgroup-v1/cpusets.rst.40924092+ See Documentation/admin-guide/cgroup-v1/cpusets.rst.4093409340944094 reserve= [KNL,BUGS] Force kernel to ignore I/O ports or memory40954095 Format: <base1>,<size1>[,<base2>,<size2>,...]···45994599 swapaccount=[0|1]46004600 [KNL] Enable accounting of swap in memory resource46014601 controller if no parameter or 1 is given or disable46024602- it if 0 is given (See Documentation/cgroup-v1/memory.rst)46024602+ it if 0 is given (See Documentation/admin-guide/cgroup-v1/memory.rst)4603460346044604 swiotlb= [ARM,IA-64,PPC,MIPS,X86]46054605 Format: { <int> | force | noforce }
···1515support.16161717Memory policies should not be confused with cpusets1818-(``Documentation/cgroup-v1/cpusets.rst``)1818+(``Documentation/admin-guide/cgroup-v1/cpusets.rst``)1919which is an administrative mechanism for restricting the nodes from which2020memory may be allocated by a set of processes. Memory policies are a2121programming interface that a NUMA-aware application can take advantage of. When
+1-1
Documentation/block/bfq-iosched.rst
···547547created, and kept up-to-date by bfq, depends on whether548548CONFIG_BFQ_CGROUP_DEBUG is set. If it is set, then bfq creates all549549the stat files documented in550550-Documentation/cgroup-v1/blkio-controller.rst. If, instead,550550+Documentation/admin-guide/cgroup-v1/blkio-controller.rst. If, instead,551551CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files::552552553553 blkio.bfq.io_service_bytes
···33==============4455Written by Paul Menage <menage@google.com> based on66-Documentation/cgroup-v1/cpusets.rst66+Documentation/admin-guide/cgroup-v1/cpusets.rst7788Original copyright statements from cpusets.txt:99···7676tracking. The intention is that other subsystems hook into the generic7777cgroup support to provide new attributes for cgroups, such as7878accounting/limiting the resources which processes in a cgroup can7979-access. For example, cpusets (see Documentation/cgroup-v1/cpusets.rst) allow7979+access. For example, cpusets (see Documentation/admin-guide/cgroup-v1/cpusets.rst) allow8080you to associate a set of CPUs and a set of memory nodes with the8181tasks in each cgroup.8282
···4949job placement on large systems.50505151Cpusets use the generic cgroup subsystem described in5252-Documentation/cgroup-v1/cgroups.rst.5252+Documentation/admin-guide/cgroup-v1/cgroups.rst.53535454Requests by a task, using the sched_setaffinity(2) system call to5555include CPUs in its CPU affinity mask, and using the mbind(2) and
···1010is complex. This is a document for memcg's internal behavior.1111Please note that implementation details can be changed.12121313-(*) Topics on API should be in Documentation/cgroup-v1/memory.rst)1313+(*) Topics on API should be in Documentation/admin-guide/cgroup-v1/memory.rst)141415150. How to record usage ?1616========================···327327 You can see charges have been moved by reading ``*.usage_in_bytes`` or328328 memory.stat of both A and B.329329330330- See 8.2 of Documentation/cgroup-v1/memory.rst to see what value should330330+ See 8.2 of Documentation/admin-guide/cgroup-v1/memory.rst to see what value should331331 be written to move_charge_at_immigrate.3323323333339.10 Memory thresholds
···9898use at file creation time. When a task allocates a file in the file9999system, the mount option memory policy will be applied with a NodeList,100100if any, modified by the calling task's cpuset constraints101101-[See Documentation/cgroup-v1/cpusets.rst] and any optional flags, listed101101+[See Documentation/admin-guide/cgroup-v1/cpusets.rst] and any optional flags, listed102102below. If the resulting NodeLists is the empty set, the effective memory103103policy for the file will revert to "default" policy.104104
+1-1
Documentation/kernel-per-CPU-kthreads.txt
···12121313- Documentation/IRQ-affinity.txt: Binding interrupts to sets of CPUs.14141515-- Documentation/cgroup-v1: Using cgroups to bind tasks to sets of CPUs.1515+- Documentation/admin-guide/cgroup-v1: Using cgroups to bind tasks to sets of CPUs.16161717- man taskset: Using the taskset command to bind tasks to sets1818 of CPUs.
+1-1
Documentation/scheduler/sched-deadline.rst
···669669670670 -deadline tasks cannot have an affinity mask smaller that the entire671671 root_domain they are created on. However, affinities can be specified672672- through the cpuset facility (Documentation/cgroup-v1/cpusets.rst).672672+ through the cpuset facility (Documentation/admin-guide/cgroup-v1/cpusets.rst).6736736746745.1 SCHED_DEADLINE and cpusets HOWTO675675------------------------------------
+1-1
Documentation/scheduler/sched-design-CFS.rst
···222222223223 These options need CONFIG_CGROUPS to be defined, and let the administrator224224 create arbitrary groups of tasks, using the "cgroup" pseudo filesystem. See225225- Documentation/cgroup-v1/cgroups.rst for more information about this filesystem.225225+ Documentation/admin-guide/cgroup-v1/cgroups.rst for more information about this filesystem.226226227227When CONFIG_FAIR_GROUP_SCHED is defined, a "cpu.shares" file is created for each228228group created using the pseudo filesystem. See example steps below to create
+1-1
Documentation/scheduler/sched-rt-group.rst
···133133to control the CPU time reserved for each control group.134134135135For more information on working with control groups, you should read136136-Documentation/cgroup-v1/cgroups.rst as well.136136+Documentation/admin-guide/cgroup-v1/cgroups.rst as well.137137138138Group settings are checked against the following limits in order to keep the139139configuration schedulable:
+2-2
Documentation/vm/numa.rst
···6767physical memory. NUMA emluation is useful for testing NUMA kernel and6868application features on non-NUMA platforms, and as a sort of memory resource6969management mechanism when used together with cpusets.7070-[see Documentation/cgroup-v1/cpusets.rst]7070+[see Documentation/admin-guide/cgroup-v1/cpusets.rst]71717272For each node with memory, Linux constructs an independent memory management7373subsystem, complete with its own free page lists, in-use page lists, usage···114114115115System administrators can restrict the CPUs and nodes' memories that a non-116116privileged user can specify in the scheduling or NUMA commands and functions117117-using control groups and CPUsets. [see Documentation/cgroup-v1/cpusets.rst]117117+using control groups and CPUsets. [see Documentation/admin-guide/cgroup-v1/cpusets.rst]118118119119On architectures that do not hide memoryless nodes, Linux will include only120120zones [nodes] with memory in the zonelists. This means that for a memoryless
+1-1
Documentation/vm/page_migration.rst
···4141Larger installations usually partition the system using cpusets into4242sections of nodes. Paul Jackson has equipped cpusets with the ability to4343move pages when a task is moved to another cpuset (See4444-Documentation/cgroup-v1/cpusets.rst).4444+Documentation/admin-guide/cgroup-v1/cpusets.rst).4545Cpusets allows the automation of process locality. If a task is moved to4646a new cpuset then also all its pages are moved with it so that the4747performance of the process does not sink dramatically. Also the pages
+1-1
Documentation/vm/unevictable-lru.rst
···9898--------------------------------9999100100The unevictable LRU facility interacts with the memory control group [aka101101-memory controller; see Documentation/cgroup-v1/memory.rst] by extending the101101+memory controller; see Documentation/admin-guide/cgroup-v1/memory.rst] by extending the102102lru_list enum.103103104104The memory controller data structure automatically gets a per-zone unevictable
···1515amount of system memory that are available to a certain class of tasks.16161717For more information on the features of cpusets, see1818-Documentation/cgroup-v1/cpusets.rst.1818+Documentation/admin-guide/cgroup-v1/cpusets.rst.1919There are a number of different configurations you can use for your needs. For2020more information on the numa=fake command line option and its various ways of2121configuring fake nodes, see Documentation/x86/x86_64/boot-options.rst.···4040 On node 3 totalpages: 13107241414242Now following the instructions for mounting the cpusets filesystem from4343-Documentation/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory4343+Documentation/admin-guide/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory4444address spaces) to individual cpusets::45454646 [root@xroads /]# mkdir exampleset
···8989 one needs to mount and use blkio cgroup controller for creating9090 cgroups and specifying per device IO rate policies.91919292- See Documentation/cgroup-v1/blkio-controller.rst for more information.9292+ See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.93939494config BLK_DEV_THROTTLING_LOW9595 bool "Block throttling .low limit interface support (EXPERIMENTAL)"
+1-1
include/linux/cgroup-defs.h
···624624625625/*626626 * Control Group subsystem type.627627- * See Documentation/cgroup-v1/cgroups.rst for details627627+ * See Documentation/admin-guide/cgroup-v1/cgroups.rst for details628628 */629629struct cgroup_subsys {630630 struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css);
+1-1
include/uapi/linux/bpf.h
···806806 * based on a user-provided identifier for all traffic coming from807807 * the tasks belonging to the related cgroup. See also the related808808 * kernel documentation, available from the Linux sources in file809809- * *Documentation/cgroup-v1/net_cls.rst*.809809+ * *Documentation/admin-guide/cgroup-v1/net_cls.rst*.810810 *811811 * The Linux kernel has two versions for cgroups: there are812812 * cgroups v1 and cgroups v2. Both are available to users, who can
+2-2
init/Kconfig
···821821 controls or device isolation.822822 See823823 - Documentation/scheduler/sched-design-CFS.rst (CFS)824824- - Documentation/cgroup-v1/ (features for grouping, isolation824824+ - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation825825 and resource control)826826827827 Say N if unsure.···883883 CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set884884 CONFIG_BLK_DEV_THROTTLING=y.885885886886- See Documentation/cgroup-v1/blkio-controller.rst for more information.886886+ See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.887887888888config CGROUP_WRITEBACK889889 bool
+1-1
kernel/cgroup/cpuset.c
···729729 * load balancing domains (sched domains) as specified by that partial730730 * partition.731731 *732732- * See "What is sched_load_balance" in Documentation/cgroup-v1/cpusets.rst732732+ * See "What is sched_load_balance" in Documentation/admin-guide/cgroup-v1/cpusets.rst733733 * for a background explanation of this.734734 *735735 * Does not return errors, on the theory that the callers of this
+1-1
security/device_cgroup.c
···509509 * This is one of the three key functions for hierarchy implementation.510510 * This function is responsible for re-evaluating all the cgroup's active511511 * exceptions due to a parent's exception change.512512- * Refer to Documentation/cgroup-v1/devices.rst for more details.512512+ * Refer to Documentation/admin-guide/cgroup-v1/devices.rst for more details.513513 */514514static void revalidate_active_exceptions(struct dev_cgroup *devcg)515515{
+1-1
tools/include/uapi/linux/bpf.h
···806806 * based on a user-provided identifier for all traffic coming from807807 * the tasks belonging to the related cgroup. See also the related808808 * kernel documentation, available from the Linux sources in file809809- * *Documentation/cgroup-v1/net_cls.rst*.809809+ * *Documentation/admin-guide/cgroup-v1/net_cls.rst*.810810 *811811 * The Linux kernel has two versions for cgroups: there are812812 * cgroups v1 and cgroups v2. Both are available to users, who can