mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: lizf@cn.fujitsu.com, balbir@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	containers@lists.linux-foundation.org,
	kamezawa.hiroyu@jp.fujitsu.com
Subject: [PATCH 6/9] [RFC] Remove the cgroup_subsys.bind callback
Date: Wed, 01 Jul 2009 19:11:23 -0700	[thread overview]
Message-ID: <20090702021123.14469.90837.stgit@menage.mtv.corp.google.com> (raw)
In-Reply-To: <20090702020624.14469.47066.stgit@menage.mtv.corp.google.com>

[RFC] Remove the cgroup_subsys.bind callback

In preparation for supporting cgroup subsystems that can be bound to
multiple hierarchies, remove the "bind" callback. It's not currently
used by any in-tree subsystem and its semantics become fuzzy for
multi-bindable subsystems.  It can be re-added with clearer semantics
in the future if necessary.

Signed-off-by: Paul Menage <menage@google.com>

---

 Documentation/cgroups/cgroups.txt |    8 --------
 include/linux/cgroup.h            |    1 -
 kernel/cgroup.c                   |    4 ----
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 6eb1a97..d5be8ae 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -544,14 +544,6 @@ initialization which might be required before a task could attach.  For
 example in cpusets, no task may attach before 'cpus' and 'mems' are set
 up.
 
-void bind(struct cgroup_subsys *ss, struct cgroup *root)
-(cgroup_mutex and ss->hierarchy_mutex held by caller)
-
-Called when a cgroup subsystem is rebound to a different hierarchy
-and root cgroup. Currently this will only involve movement between
-the default hierarchy (which never has sub-cgroups) and a hierarchy
-that is being created/destroyed (and hence has no sub-cgroups).
-
 4. Questions
 ============
 
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index adf6739..a6bb0ca 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -386,7 +386,6 @@ struct cgroup_subsys {
 	int (*populate)(struct cgroup_subsys *ss,
 			struct cgroup *cgrp);
 	void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp);
-	void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
 
 	int subsys_id;
 	int active;
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 8b1b92f..74840ea 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -897,8 +897,6 @@ static int rebind_subsystems(struct cgroupfs_root *root,
 			mutex_lock(&ss->hierarchy_mutex);
 			cgrp->subsys[i] = dummytop->subsys[i];
 			cgrp->subsys[i]->cgroup = cgrp;
-			if (ss->bind)
-				ss->bind(ss, cgrp);
 			rootnode.subsys_bits &= ~bit;
 			root->subsys_bits |= bit;
 			mutex_unlock(&ss->hierarchy_mutex);
@@ -908,8 +906,6 @@ static int rebind_subsystems(struct cgroupfs_root *root,
 			BUG_ON(cgrp->subsys[i]->cgroup != cgrp);
 			BUG_ON(rootnode.subsys_bits & bit);
 			mutex_lock(&ss->hierarchy_mutex);
-			if (ss->bind)
-				ss->bind(ss, dummytop);
 			dummytop->subsys[i]->cgroup = dummytop;
 			cgrp->subsys[i] = NULL;
 			root->subsys_bits &= ~bit;


  parent reply	other threads:[~2009-07-02  2:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  2:10 [PATCH 0/9] [RFC] CGroup Hierarchy Extensions Paul Menage
2009-07-02  2:10 ` [PATCH 1/9] [RFC] Support named cgroups hierarchies Paul Menage
2009-07-02  2:28   ` KAMEZAWA Hiroyuki
2009-07-02  2:49     ` Paul Menage
2009-07-03  1:51       ` Li Zefan
2009-07-02  8:09   ` Louis Rilling
2009-07-02  8:19     ` Paul Menage
2009-07-02  8:24       ` Louis Rilling
2009-07-03  2:32   ` Li Zefan
2009-07-13 23:39     ` Paul Menage
2009-07-02  2:11 ` [PATCH 2/9] [RFC]Move the cgroup debug subsys into cgroup.c to access internal state Paul Menage
2009-07-02  2:11 ` [PATCH 3/9] [RFC] Add a back-pointer from struct cg_cgroup_link to struct cgroup Paul Menage
2009-07-03  7:07   ` Li Zefan
2009-07-21 23:48     ` Paul Menage
2009-07-02  2:11 ` [PATCH 4/9] [RFC] Allow cgroup hierarchies to be created with no bound subsystems Paul Menage
2009-07-03  7:57   ` Li Zefan
2009-07-21 23:31     ` Paul Menage
2009-07-02  2:11 ` [PATCH 5/9] [RFC] Remove cgroup_subsys.root pointer Paul Menage
2009-07-02  9:04   ` Louis Rilling
2009-07-02  9:32     ` Paul Menage
2009-07-02  2:11 ` Paul Menage [this message]
2009-07-02  2:11 ` [PATCH 7/9] [RFC] Support multiply-bindable cgroup subsystems Paul Menage
2009-07-02  2:45   ` KAMEZAWA Hiroyuki
2009-07-02  2:52     ` Paul Menage
2009-07-02  3:16       ` KAMEZAWA Hiroyuki
2009-07-02  5:04         ` Paul Menage
2009-07-03  8:36   ` Li Zefan
2009-07-02  2:11 ` [PATCH 8/9] [RFC] Example multi-bindable subsystem: a per-cgroup notes field Paul Menage
2009-07-02  2:48   ` KAMEZAWA Hiroyuki
2009-07-02  2:56     ` Paul Menage
2009-07-02  3:17       ` KAMEZAWA Hiroyuki
2009-07-02  7:22       ` Paul Menage
2009-07-03  8:58   ` Li Zefan
2009-07-14  0:49     ` Paul Menage
2009-07-02  2:11 ` [PATCH 9/9] [RFC] Example multi-bindable subsystem: a max-depth controller Paul Menage

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=20090702021123.14469.90837.stgit@menage.mtv.corp.google.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    /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

all inboxes | Powered by JetHome®