Skip to contentSkip to conversation

cgroup: add cgroup_favordynmods= command-line option

PATCH Michal Koutný 2 participants 2 messages Sep 27, 2023 1 message not in the archive cgroup

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Michal Koutný

author maintainer Reviewed-by
#1 lore raw
Quoted 10 lines · Luiz Capitulino

We have a need of using favordynmods with cgroup v1, which doesn't support changing mount flags during remount. Enabling CONFIG_CGROUP_FAVOR_DYNMODS at build-time is not an option because we want to be able to selectively enable it for certain systems.

This commit addresses this by introducing the cgroup_favordynmods= command-line option. This option works for both cgroup v1 and v2 and also allows for disabling favorynmods when the kernel built with CONFIG_CGROUP_FAVOR_DYNMODS=y.

Quoted 8 lines

Also, note that when cgroup_favordynmods=true favordynmods is never disabled in cgroup_destroy_root().

---
 .../admin-guide/kernel-parameters.txt          |  4 ++++
 kernel/cgroup/cgroup.c                         | 18 ++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

Thanks,

Reviewed-by
#2 lore raw

Re: [External] : [PATH v3] cgroup: add cgroup_favordynmods= command-line option

In reply to a message not in the archive
Quoted 10 lines · Luiz Capitulino

We have a need of using favordynmods with cgroup v1, which doesn't support changing mount flags during remount. Enabling CONFIG_CGROUP_FAVOR_DYNMODS at build-time is not an option because we want to be able to selectively enable it for certain systems.

This commit addresses this by introducing the cgroup_favordynmods= command-line option. This option works for both cgroup v1 and v2 and also allows for disabling favorynmods when the kernel built with CONFIG_CGROUP_FAVOR_DYNMODS=y.

Quoted 4 lines

Also, note that when cgroup_favordynmods=true favordynmods is never disabled in cgroup_destroy_root().

The patch looks good to me, I have also boot tested it with combinations of CONFIG_CGROUP_FAVOR_DYNMODS={y, n}, while passing the kernel parameter cgroup_favordynmods={true, false} to the command line and works as expected.