Skip to content

Commit 6bf024e

Browse files
hnazhtejun
authored andcommitted
cgroup: put controller Kconfig options in meaningful order
To make it easier to quickly find what's needed list the basic resource controllers of cgroup2 first - io, memory, cpu - while pushing the more exotic and/or legacy controllers to the bottom. tj: Removed spurious "&& CGROUPS" from CGROUP_PERF as suggested by Li. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Zefan Li <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent a0166ec commit 6bf024e

File tree

1 file changed

+107
-107
lines changed

1 file changed

+107
-107
lines changed

init/Kconfig

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -940,64 +940,6 @@ menuconfig CGROUPS
940940

941941
if CGROUPS
942942

943-
config CGROUP_DEBUG
944-
bool "Example controller"
945-
default n
946-
help
947-
This option enables a simple controller that exports
948-
debugging information about the cgroups framework.
949-
950-
Say N.
951-
952-
config CGROUP_FREEZER
953-
bool "Freezer controller"
954-
help
955-
Provides a way to freeze and unfreeze all tasks in a
956-
cgroup.
957-
958-
config CGROUP_PIDS
959-
bool "PIDs controller"
960-
help
961-
Provides enforcement of process number limits in the scope of a
962-
cgroup. Any attempt to fork more processes than is allowed in the
963-
cgroup will fail. PIDs are fundamentally a global resource because it
964-
is fairly trivial to reach PID exhaustion before you reach even a
965-
conservative kmemcg limit. As a result, it is possible to grind a
966-
system to halt without being limited by other cgroup policies. The
967-
PIDs cgroup subsystem is designed to stop this from happening.
968-
969-
It should be noted that organisational operations (such as attaching
970-
to a cgroup hierarchy will *not* be blocked by the PIDs subsystem),
971-
since the PIDs limit only affects a process's ability to fork, not to
972-
attach to a cgroup.
973-
974-
config CGROUP_DEVICE
975-
bool "Device controller"
976-
help
977-
Provides a cgroup controller implementing whitelists for
978-
devices which a process in the cgroup can mknod or open.
979-
980-
config CPUSETS
981-
bool "Cpuset controller"
982-
help
983-
This option will let you create and manage CPUSETs which
984-
allow dynamically partitioning a system into sets of CPUs and
985-
Memory Nodes and assigning tasks to run only within those sets.
986-
This is primarily useful on large SMP or NUMA systems.
987-
988-
Say N if unsure.
989-
990-
config PROC_PID_CPUSET
991-
bool "Include legacy /proc/<pid>/cpuset file"
992-
depends on CPUSETS
993-
default y
994-
995-
config CGROUP_CPUACCT
996-
bool "Simple CPU accounting controller"
997-
help
998-
Provides a simple controller for monitoring the
999-
total CPU consumed by the tasks in a cgroup.
1000-
1001943
config PAGE_COUNTER
1002944
bool
1003945

@@ -1039,31 +981,40 @@ config MEMCG_KMEM
1039981
the kmem extension can use it to guarantee that no group of processes
1040982
will ever exhaust kernel resources alone.
1041983

1042-
config CGROUP_HUGETLB
1043-
bool "HugeTLB controller"
1044-
depends on HUGETLB_PAGE
1045-
select PAGE_COUNTER
984+
config BLK_CGROUP
985+
bool "IO controller"
986+
depends on BLOCK
1046987
default n
1047-
help
1048-
Provides a cgroup controller for HugeTLB pages.
1049-
When you enable this, you can put a per cgroup limit on HugeTLB usage.
1050-
The limit is enforced during page fault. Since HugeTLB doesn't
1051-
support page reclaim, enforcing the limit at page fault time implies
1052-
that, the application will get SIGBUS signal if it tries to access
1053-
HugeTLB pages beyond its limit. This requires the application to know
1054-
beforehand how much HugeTLB pages it would require for its use. The
1055-
control group is tracked in the third page lru pointer. This means
1056-
that we cannot use the controller with huge page less than 3 pages.
988+
---help---
989+
Generic block IO controller cgroup interface. This is the common
990+
cgroup interface which should be used by various IO controlling
991+
policies.
1057992

1058-
config CGROUP_PERF
1059-
bool "Perf controller"
1060-
depends on PERF_EVENTS && CGROUPS
1061-
help
1062-
This option extends the perf per-cpu mode to restrict monitoring
1063-
to threads which belong to the cgroup specified and run on the
1064-
designated cpu.
993+
Currently, CFQ IO scheduler uses it to recognize task groups and
994+
control disk bandwidth allocation (proportional time slice allocation)
995+
to such task groups. It is also used by bio throttling logic in
996+
block layer to implement upper limit in IO rates on a device.
1065997

1066-
Say N if unsure.
998+
This option only enables generic Block IO controller infrastructure.
999+
One needs to also enable actual IO controlling logic/policy. For
1000+
enabling proportional weight division of disk bandwidth in CFQ, set
1001+
CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1002+
CONFIG_BLK_DEV_THROTTLING=y.
1003+
1004+
See Documentation/cgroups/blkio-controller.txt for more information.
1005+
1006+
config DEBUG_BLK_CGROUP
1007+
bool "IO controller debugging"
1008+
depends on BLK_CGROUP
1009+
default n
1010+
---help---
1011+
Enable some debugging help. Currently it exports additional stat
1012+
files in a cgroup which can be useful for debugging.
1013+
1014+
config CGROUP_WRITEBACK
1015+
bool
1016+
depends on MEMCG && BLK_CGROUP
1017+
default y
10671018

10681019
menuconfig CGROUP_SCHED
10691020
bool "CPU controller"
@@ -1103,40 +1054,89 @@ config RT_GROUP_SCHED
11031054

11041055
endif #CGROUP_SCHED
11051056

1106-
config BLK_CGROUP
1107-
bool "IO controller"
1108-
depends on BLOCK
1057+
config CGROUP_PIDS
1058+
bool "PIDs controller"
1059+
help
1060+
Provides enforcement of process number limits in the scope of a
1061+
cgroup. Any attempt to fork more processes than is allowed in the
1062+
cgroup will fail. PIDs are fundamentally a global resource because it
1063+
is fairly trivial to reach PID exhaustion before you reach even a
1064+
conservative kmemcg limit. As a result, it is possible to grind a
1065+
system to halt without being limited by other cgroup policies. The
1066+
PIDs cgroup subsystem is designed to stop this from happening.
1067+
1068+
It should be noted that organisational operations (such as attaching
1069+
to a cgroup hierarchy will *not* be blocked by the PIDs subsystem),
1070+
since the PIDs limit only affects a process's ability to fork, not to
1071+
attach to a cgroup.
1072+
1073+
config CGROUP_FREEZER
1074+
bool "Freezer controller"
1075+
help
1076+
Provides a way to freeze and unfreeze all tasks in a
1077+
cgroup.
1078+
1079+
config CGROUP_HUGETLB
1080+
bool "HugeTLB controller"
1081+
depends on HUGETLB_PAGE
1082+
select PAGE_COUNTER
11091083
default n
1110-
---help---
1111-
Generic block IO controller cgroup interface. This is the common
1112-
cgroup interface which should be used by various IO controlling
1113-
policies.
1084+
help
1085+
Provides a cgroup controller for HugeTLB pages.
1086+
When you enable this, you can put a per cgroup limit on HugeTLB usage.
1087+
The limit is enforced during page fault. Since HugeTLB doesn't
1088+
support page reclaim, enforcing the limit at page fault time implies
1089+
that, the application will get SIGBUS signal if it tries to access
1090+
HugeTLB pages beyond its limit. This requires the application to know
1091+
beforehand how much HugeTLB pages it would require for its use. The
1092+
control group is tracked in the third page lru pointer. This means
1093+
that we cannot use the controller with huge page less than 3 pages.
11141094

1115-
Currently, CFQ IO scheduler uses it to recognize task groups and
1116-
control disk bandwidth allocation (proportional time slice allocation)
1117-
to such task groups. It is also used by bio throttling logic in
1118-
block layer to implement upper limit in IO rates on a device.
1095+
config CPUSETS
1096+
bool "Cpuset controller"
1097+
help
1098+
This option will let you create and manage CPUSETs which
1099+
allow dynamically partitioning a system into sets of CPUs and
1100+
Memory Nodes and assigning tasks to run only within those sets.
1101+
This is primarily useful on large SMP or NUMA systems.
11191102

1120-
This option only enables generic Block IO controller infrastructure.
1121-
One needs to also enable actual IO controlling logic/policy. For
1122-
enabling proportional weight division of disk bandwidth in CFQ, set
1123-
CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
1124-
CONFIG_BLK_DEV_THROTTLING=y.
1103+
Say N if unsure.
11251104

1126-
See Documentation/cgroups/blkio-controller.txt for more information.
1105+
config PROC_PID_CPUSET
1106+
bool "Include legacy /proc/<pid>/cpuset file"
1107+
depends on CPUSETS
1108+
default y
11271109

1128-
config DEBUG_BLK_CGROUP
1129-
bool "IO controller debugging"
1130-
depends on BLK_CGROUP
1110+
config CGROUP_DEVICE
1111+
bool "Device controller"
1112+
help
1113+
Provides a cgroup controller implementing whitelists for
1114+
devices which a process in the cgroup can mknod or open.
1115+
1116+
config CGROUP_CPUACCT
1117+
bool "Simple CPU accounting controller"
1118+
help
1119+
Provides a simple controller for monitoring the
1120+
total CPU consumed by the tasks in a cgroup.
1121+
1122+
config CGROUP_PERF
1123+
bool "Perf controller"
1124+
depends on PERF_EVENTS
1125+
help
1126+
This option extends the perf per-cpu mode to restrict monitoring
1127+
to threads which belong to the cgroup specified and run on the
1128+
designated cpu.
1129+
1130+
Say N if unsure.
1131+
1132+
config CGROUP_DEBUG
1133+
bool "Example controller"
11311134
default n
1132-
---help---
1133-
Enable some debugging help. Currently it exports additional stat
1134-
files in a cgroup which can be useful for debugging.
1135+
help
1136+
This option enables a simple controller that exports
1137+
debugging information about the cgroups framework.
11351138

1136-
config CGROUP_WRITEBACK
1137-
bool
1138-
depends on MEMCG && BLK_CGROUP
1139-
default y
1139+
Say N.
11401140

11411141
endif # CGROUPS
11421142

0 commit comments

Comments
 (0)