lkml.org 
[lkml]   [2011]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] cgroup: Fix cgroup_subsys::exit callback
* Peter Zijlstra <peterz@infradead.org> [2011-02-07 17:10:33]:

> On Thu, 2011-02-03 at 00:32 +0530, Balbir Singh wrote:
> > > No, just fixed. The callback as it exists isn't useful and leads to
> > > hacks like the above.
>
> ---
> Subject: cgroup: Fix cgroup_subsys::exit callback
> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Mon Feb 07 17:02:20 CET 2011
>
> Make the ::exit method act like ::attach, it is after all very nearly
> the same thing.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> LKML-Reference: <new-submission>
> ---
> Index: linux-2.6/include/linux/cgroup.h
> ===================================================================
> --- linux-2.6.orig/include/linux/cgroup.h
> +++ linux-2.6/include/linux/cgroup.h
> @@ -474,7 +474,8 @@ struct cgroup_subsys {
> struct cgroup *old_cgrp, struct task_struct *tsk,
> bool threadgroup);
> void (*fork)(struct cgroup_subsys *ss, struct task_struct *task);
> - void (*exit)(struct cgroup_subsys *ss, struct task_struct *task);
> + void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp,
> + struct cgroup *old_cgrp, struct task_struct *task);

The effective change I see

1. mutex_lock() being held
2. Old cgroup being passed as a part of the notification

Is 1 required? I don't see anything in the changelog. For (2), I don't
see it being used, is the use in the scheduler cgroup path/patch?

--
Three Cheers,
Balbir


\
 
 \ /
  Last update: 2011-02-13 13:55    [W:0.088 / U:2.660 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site