* [PATCH 1/2] cgroup: remove cgroup_attach_task_current_cg()
@ 2012-01-20 3:58 Li Zefan
2012-01-20 3:58 ` [PATCH 2/2] cgroup: move struct cgroup_pidlist out from the header file Li Zefan
0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2012-01-20 3:58 UTC (permalink / raw)
To: Tejun Heo; +Cc: LKML, Cgroups
It's just a wrapper of cgroup_attach_task_all(), and it's no longer
used after commit 87d6a412bd1ed82c14cabd4b408003b23bbd2880
(vhost: fix attach to cgroups regression)
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
include/linux/cgroup.h | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e9b6021..dee53bd 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -602,11 +602,6 @@ int cgroup_scan_tasks(struct cgroup_scanner *scan);
int cgroup_attach_task(struct cgroup *, struct task_struct *);
int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
-static inline int cgroup_attach_task_current_cg(struct task_struct *tsk)
-{
- return cgroup_attach_task_all(current, tsk);
-}
-
/*
* CSS ID is ID for cgroup_subsys_state structs under subsys. This only works
* if cgroup_subsys.use_id == true. It can be used for looking up and scanning.
@@ -669,10 +664,6 @@ static inline int cgroup_attach_task_all(struct task_struct *from,
{
return 0;
}
-static inline int cgroup_attach_task_current_cg(struct task_struct *t)
-{
- return 0;
-}
#endif /* !CONFIG_CGROUPS */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] cgroup: move struct cgroup_pidlist out from the header file
2012-01-20 3:58 [PATCH 1/2] cgroup: remove cgroup_attach_task_current_cg() Li Zefan
@ 2012-01-20 3:58 ` Li Zefan
2012-01-20 17:31 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2012-01-20 3:58 UTC (permalink / raw)
To: Tejun Heo; +Cc: LKML, Cgroups
It's internally used only.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
include/linux/cgroup.h | 32 --------------------------------
kernel/cgroup.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index dee53bd..7da3e74 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -160,38 +160,6 @@ enum {
CGRP_CLONE_CHILDREN,
};
-/* which pidlist file are we talking about? */
-enum cgroup_filetype {
- CGROUP_FILE_PROCS,
- CGROUP_FILE_TASKS,
-};
-
-/*
- * A pidlist is a list of pids that virtually represents the contents of one
- * of the cgroup files ("procs" or "tasks"). We keep a list of such pidlists,
- * a pair (one each for procs, tasks) for each pid namespace that's relevant
- * to the cgroup.
- */
-struct cgroup_pidlist {
- /*
- * used to find which pidlist is wanted. doesn't change as long as
- * this particular list stays in the list.
- */
- struct { enum cgroup_filetype type; struct pid_namespace *ns; } key;
- /* array of xids */
- pid_t *list;
- /* how many elements the above list has */
- int length;
- /* how many files are using the current array */
- int use_count;
- /* each of these stored in a list by its cgroup */
- struct list_head links;
- /* pointer to the cgroup we belong to, for list removal purposes */
- struct cgroup *owner;
- /* protects the other fields */
- struct rw_semaphore mutex;
-};
-
struct cgroup {
unsigned long flags; /* "unsigned long" so bitops work */
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a5d3b53..6ca7aca 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3043,6 +3043,38 @@ int cgroup_scan_tasks(struct cgroup_scanner *scan)
*
*/
+/* which pidlist file are we talking about? */
+enum cgroup_filetype {
+ CGROUP_FILE_PROCS,
+ CGROUP_FILE_TASKS,
+};
+
+/*
+ * A pidlist is a list of pids that virtually represents the contents of one
+ * of the cgroup files ("procs" or "tasks"). We keep a list of such pidlists,
+ * a pair (one each for procs, tasks) for each pid namespace that's relevant
+ * to the cgroup.
+ */
+struct cgroup_pidlist {
+ /*
+ * used to find which pidlist is wanted. doesn't change as long as
+ * this particular list stays in the list.
+ */
+ struct { enum cgroup_filetype type; struct pid_namespace *ns; } key;
+ /* array of xids */
+ pid_t *list;
+ /* how many elements the above list has */
+ int length;
+ /* how many files are using the current array */
+ int use_count;
+ /* each of these stored in a list by its cgroup */
+ struct list_head links;
+ /* pointer to the cgroup we belong to, for list removal purposes */
+ struct cgroup *owner;
+ /* protects the other fields */
+ struct rw_semaphore mutex;
+};
+
/*
* The following two functions "fix" the issue where there are more pids
* than kmalloc will give memory for; in such cases, we use vmalloc/vfree.
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] cgroup: move struct cgroup_pidlist out from the header file
2012-01-20 3:58 ` [PATCH 2/2] cgroup: move struct cgroup_pidlist out from the header file Li Zefan
@ 2012-01-20 17:31 ` Tejun Heo
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2012-01-20 17:31 UTC (permalink / raw)
To: Li Zefan; +Cc: LKML, Cgroups
On Fri, Jan 20, 2012 at 11:58:43AM +0800, Li Zefan wrote:
> It's internally used only.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Both applied to cgroup/for-3.4. Thanks!
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-20 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20 3:58 [PATCH 1/2] cgroup: remove cgroup_attach_task_current_cg() Li Zefan
2012-01-20 3:58 ` [PATCH 2/2] cgroup: move struct cgroup_pidlist out from the header file Li Zefan
2012-01-20 17:31 ` Tejun Heo
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).