linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Glauber Costa <glommer@parallels.com>
Cc: lizefan@huawei.com, mhocko@suse.cz, rjw@sisk.pl,
	containers@lists.linux-foundation.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	fweisbec@gmail.com, Peter Zijlstra <peterz@infradead.org>
Subject: [RFC] cgroup: deprecate clone_children
Date: Mon, 5 Nov 2012 10:02:13 -0800	[thread overview]
Message-ID: <20121105180213.GB19354@mtj.dyndns.org> (raw)
In-Reply-To: <5097C23B.3040808@parallels.com>

clone_children makes cgroup invoke ->post_clone() callback if it
exists and sets CGRP_CLONE_CHILDREN.  ->post_clone(), while being
named generically, is only supposed to copy configuration from its
parent.

This is an entirely convenience feature which is only used by cpuset
to alter its configuration propagation.  As the mount option and
cgroupfs knobs are cgroup-wide and different controllers differ in
their configuration propagations, it's awkward to use for multiple
controllers especially if they're co-mounted.  At this point, we can't
use this flag for any other controller anyway as it would implicitly
change the behavior.

As this is unnecessary feature with very limited use and awkward in
co-mounted use cases, let's try to deprecate it.  Whine on the mount
option and accesses to cgroupfs knobs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
Glauber, I think this is more befitting change for .post_clone().  If
people aren't depending on this, I'd much prefer to just remove it.

Thanks.

 kernel/cgroup.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1162,6 +1162,8 @@ static int parse_cgroupfs_options(char *
 			continue;
 		}
 		if (!strcmp(token, "clone_children")) {
+			pr_warning("cgroup: mount option clone_children is deprecated (pid=%d comm=%s)\n",
+				   task_tgid_nr(current), current->comm);
 			opts->clone_children = true;
 			continue;
 		}
@@ -3837,6 +3839,9 @@ fail:
 static u64 cgroup_clone_children_read(struct cgroup *cgrp,
 				    struct cftype *cft)
 {
+	printk_ratelimited(KERN_WARNING "cgroup: clone_children is deprecated (pid=%d comm=%s)\n",
+			   task_tgid_nr(current), current->comm);
+
 	return clone_children(cgrp);
 }
 
@@ -3844,6 +3849,9 @@ static int cgroup_clone_children_write(s
 				     struct cftype *cft,
 				     u64 val)
 {
+	printk_ratelimited(KERN_WARNING "cgroup: clone_children is deprecated (pid=%d comm=%s)\n",
+			   task_tgid_nr(current), current->comm);
+
 	if (val)
 		set_bit(CGRP_CLONE_CHILDREN, &cgrp->flags);
 	else

  reply	other threads:[~2012-11-05 18:02 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03  8:38 [PATCHSET cgroup/for-3.8] cgroup_freezer: implement proper hierarchy support Tejun Heo
2012-11-03  8:38 ` [PATCH 1/9] cgroup: add cgroup_subsys->post_create() Tejun Heo
2012-11-05 13:42   ` Glauber Costa
2012-11-05 18:02     ` Tejun Heo [this message]
2012-11-05 19:17       ` [RFC] cgroup: deprecate clone_children Serge Hallyn
2012-11-05 19:26         ` Tejun Heo
2012-11-07 15:25   ` [PATCH 1/9] cgroup: add cgroup_subsys->post_create() Michal Hocko
2012-11-07 17:02     ` Tejun Heo
2012-11-07 17:15   ` [PATCH 1/9 v2] " Tejun Heo
2012-11-07 17:40     ` Michal Hocko
2012-11-08  2:59     ` Kamezawa Hiroyuki
2012-11-08 19:07   ` [PATCH 1/9 v3] " Tejun Heo
2012-11-09  9:09     ` Li Zefan
2012-11-09  9:09     ` Li Zefan
2012-11-09 11:09     ` Daniel Wagner
2012-11-09 17:22       ` Tejun Heo
2012-11-10  1:35         ` Glauber Costa
2012-11-12 13:04         ` Daniel Wagner
2012-11-03  8:38 ` [PATCH 2/9] cgroup: Use rculist ops for cgroup->children Tejun Heo
2012-11-07 15:30   ` Michal Hocko
2012-11-08  3:01   ` Kamezawa Hiroyuki
2012-11-09  9:10   ` Li Zefan
2012-11-03  8:38 ` [PATCH 3/9] cgroup: implement generic child / descendant walk macros Tejun Heo
2012-11-06 20:31   ` Tejun Heo
2012-11-07 15:38     ` Michal Hocko
2012-11-07 16:54   ` Michal Hocko
2012-11-07 17:01     ` Tejun Heo
2012-11-07 17:49       ` Michal Hocko
2012-11-08  3:21   ` Kamezawa Hiroyuki
2012-11-08  9:50   ` Michal Hocko
2012-11-08 17:15     ` Tejun Heo
2012-11-08 17:59   ` [PATCH 3/9 v2] " Tejun Heo
2012-11-09  9:13     ` Li Zefan
2012-11-03  8:38 ` [PATCH 4/9] cgroup_freezer: trivial cleanups Tejun Heo
2012-11-08  3:24   ` Kamezawa Hiroyuki
2012-11-08  9:53   ` Michal Hocko
2012-11-03  8:38 ` [PATCH 5/9] cgroup_freezer: prepare freezer_change_state() for full hierarchy support Tejun Heo
2012-11-08  4:25   ` Kamezawa Hiroyuki
2012-11-08  9:56   ` Michal Hocko
2012-11-03  8:38 ` [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags Tejun Heo
2012-11-08  4:37   ` Kamezawa Hiroyuki
2012-11-08  4:42     ` Tejun Heo
2012-11-08  5:00       ` Kamezawa Hiroyuki
2012-11-08 14:38         ` Tejun Heo
2012-11-08 10:39   ` Michal Hocko
2012-11-08 14:39     ` Tejun Heo
2012-11-08 14:47       ` Michal Hocko
2012-11-03  8:38 ` [PATCH 7/9] cgroup_freezer: introduce CGROUP_FREEZING_[SELF|PARENT] Tejun Heo
2012-11-08  4:42   ` Kamezawa Hiroyuki
2012-11-08  4:45     ` Tejun Heo
2012-11-08  4:56       ` Kamezawa Hiroyuki
2012-11-08 14:41         ` Tejun Heo
2012-11-08 12:47   ` Michal Hocko
2012-11-08 14:42     ` Tejun Heo
2012-11-03  8:38 ` [PATCH 8/9] cgroup_freezer: add ->post_create() and ->pre_destroy() and track online state Tejun Heo
2012-11-08  4:48   ` Kamezawa Hiroyuki
2012-11-08 15:41     ` Tejun Heo
2012-11-08 13:23   ` Michal Hocko
2012-11-08 17:17     ` Tejun Heo
2012-11-03  8:38 ` [PATCH 9/9] cgroup_freezer: implement proper hierarchy support Tejun Heo
2012-11-07 11:00   ` Michal Hocko
2012-11-07 16:31     ` Tejun Heo
2012-11-07 16:39   ` [PATCH 9/9 v2] " Tejun Heo
2012-11-08 14:08     ` Michal Hocko
2012-11-08 14:18       ` Tejun Heo
2012-11-08 15:20         ` Michal Hocko
2012-11-08 15:29           ` Tejun Heo
2012-11-08 15:57             ` Michal Hocko
2012-11-08 17:57   ` [PATCH 9/9 v3] " Tejun Heo
2012-11-08 18:02     ` Michal Hocko
2012-11-08 18:04       ` Tejun Heo
2012-11-08 18:08         ` Michal Hocko
2012-11-08 18:01 ` [PATCHSET cgroup/for-3.8] " Tejun Heo
2012-11-09 17:15 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121105180213.GB19354@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=glommer@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mhocko@suse.cz \
    --cc=peterz@infradead.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).