Skip to content

Commit

Permalink
change default RC_CGROUP_MODE to unified
Browse files Browse the repository at this point in the history
This improves resource management by assigning services to individual
cgroups.

X-Gentoo-Bug: https://bugs.gentoo.org/914972
  • Loading branch information
williamh committed Oct 10, 2023
1 parent b85d771 commit 965de92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etc/rc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ rc_tty_number=12
# cgroups version 1 on /sys/fs/cgroup.
# "legacy" mounts cgroups version 1 on /sys/fs/cgroup
# "unified" mounts cgroups version 2 on /sys/fs/cgroup
#rc_cgroup_mode="hybrid"
#rc_cgroup_mode="unified"

# This is a list of controllers which should be enabled for cgroups version 2
# when hybrid mode is being used.
Expand Down
2 changes: 1 addition & 1 deletion init.d/cgroups.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ cgroups_unified()

mount_cgroups()
{
case "${rc_cgroup_mode:-hybrid}" in
case "${rc_cgroup_mode:-unified}" in
hybrid) cgroups_hybrid ;;
legacy) cgroups_legacy ;;
unified) cgroups_unified ;;
Expand Down
2 changes: 1 addition & 1 deletion sh/rc-cgroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ cgroup_set_limits()
cgroup2_find_path()
{
if grep -qw cgroup2 /proc/filesystems; then
case "${rc_cgroup_mode:-hybrid}" in
case "${rc_cgroup_mode:-unified}" in
hybrid) printf "/sys/fs/cgroup/unified" ;;
unified) printf "/sys/fs/cgroup" ;;
esac
Expand Down

0 comments on commit 965de92

Please sign in to comment.