cgroup v2 currently supports the following mount options.
- [no]nsdelegate
+ nsdelegate
Consider cgroup namespaces as delegation boundaries. This
option is system wide and can only be set on mount or modified
through remount from the init namespace. The mount option is
ignored on non-init namespace mounts. Please refer to the
Delegation section for details.
- [no]favordynmods
+ favordynmods
Reduce the latencies of dynamic cgroup modifications such as
task migrations and controller on/offs at the cost of making
hot path operations such as forks and exits more expensive.
controllers, and then seeding it with CLONE_INTO_CGROUP is
not affected by this option.
- memory_[no]localevents
+ memory_localevents
Only populate memory.events with data for the current cgroup,
and not any subtrees. This is legacy behaviour, the default
behaviour without this option is to include subtree counts.
modified through remount from the init namespace. The mount
option is ignored on non-init namespace mounts.
- memory_[no]recursiveprot
+ memory_recursiveprot
Recursively apply memory.min and memory.low protection to
entire subtrees, without requiring explicit downward
propagation into leaf cgroups. This allows protecting entire
}
enum cgroup2_param {
- Opt_nsdelegate, Opt_nonsdelegate,
- Opt_favordynmods, Opt_nofavordynmods,
- Opt_memory_localevents, Opt_memory_nolocalevents,
- Opt_memory_recursiveprot, Opt_memory_norecursiveprot,
+ Opt_nsdelegate,
+ Opt_favordynmods,
+ Opt_memory_localevents,
+ Opt_memory_recursiveprot,
nr__cgroup2_params
};
static const struct fs_parameter_spec cgroup2_fs_parameters[] = {
fsparam_flag("nsdelegate", Opt_nsdelegate),
- fsparam_flag("nonsdelegate", Opt_nonsdelegate),
fsparam_flag("favordynmods", Opt_favordynmods),
- fsparam_flag("nofavordynmods", Opt_nofavordynmods),
fsparam_flag("memory_localevents", Opt_memory_localevents),
- fsparam_flag("memory_nolocalevents", Opt_memory_nolocalevents),
fsparam_flag("memory_recursiveprot", Opt_memory_recursiveprot),
- fsparam_flag("memory_norecursiveprot", Opt_memory_norecursiveprot),
{}
};
case Opt_nsdelegate:
ctx->flags |= CGRP_ROOT_NS_DELEGATE;
return 0;
- case Opt_nonsdelegate:
- ctx->flags &= ~CGRP_ROOT_NS_DELEGATE;
- return 0;
case Opt_favordynmods:
ctx->flags |= CGRP_ROOT_FAVOR_DYNMODS;
return 0;
- case Opt_nofavordynmods:
- ctx->flags &= ~CGRP_ROOT_FAVOR_DYNMODS;
- return 0;
case Opt_memory_localevents:
ctx->flags |= CGRP_ROOT_MEMORY_LOCAL_EVENTS;
return 0;
- case Opt_memory_nolocalevents:
- ctx->flags &= ~CGRP_ROOT_MEMORY_LOCAL_EVENTS;
- return 0;
case Opt_memory_recursiveprot:
ctx->flags |= CGRP_ROOT_MEMORY_RECURSIVE_PROT;
return 0;
- case Opt_memory_norecursiveprot:
- ctx->flags &= ~CGRP_ROOT_MEMORY_RECURSIVE_PROT;
- return 0;
}
return -EINVAL;
}