Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cgroup: Add deprecation message to legacy freezer controller

As explained in the commit 76f969e8948d8 ("cgroup: cgroup v2 freezer"),
the original freezer is imperfect, some users may unwittingly rely on it
when there exists the alternative of v2. Print a message when it happens
and explain that in the docs.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Michal Koutný and committed by
Tejun Heo
78f6519e fd4fd0a8

+8 -2
+4
Documentation/admin-guide/cgroup-v1/freezer-subsystem.rst
··· 125 125 126 126 This is the basic mechanism which should do the right thing for user space task 127 127 in a simple scenario. 128 + 129 + This freezer implementation is affected by shortcomings (see commit 130 + 76f969e8948d8 ("cgroup: cgroup v2 freezer")) and cgroup v2 freezer is 131 + recommended.
+4 -2
kernel/cgroup/legacy_freezer.c
··· 430 430 431 431 if (strcmp(buf, freezer_state_strs(0)) == 0) 432 432 freeze = false; 433 - else if (strcmp(buf, freezer_state_strs(CGROUP_FROZEN)) == 0) 433 + else if (strcmp(buf, freezer_state_strs(CGROUP_FROZEN)) == 0) { 434 + pr_info_once("Freezing with imperfect legacy cgroup freezer. " 435 + "See cgroup.freeze of cgroup v2\n"); 434 436 freeze = true; 435 - else 437 + } else 436 438 return -EINVAL; 437 439 438 440 freezer_change_state(css_freezer(of_css(of)), freeze);