OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH] cgroup: fix default notify_on_release setting
Re: [PATCH] cgroup: fix default notify_on_release setting [message #27726] Mon, 25 February 2008 06:22 Go to next message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On Sun, Feb 24, 2008 at 9:53 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
> The documentation says the default value of notify_on_release of
>  a child cgroup is inherited from its parent, which is reasonable,
>  but the implementation just sets the flag disabled.
>
>  Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

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

Yes, I guess it makes sense to follow the original cpusets behaviour.
I think that got lost when the notify-on-release functionality was
temporarily removed during cgroups development.

>  ---
>   kernel/cgroup.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
>  diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>  index d8abe99..e9c2fb0 100644
>  --- a/kernel/cgroup.c
>  +++ b/kernel/cgroup.c
>  @@ -2232,7 +2232,6 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
>
>         mutex_lock(&cgroup_mutex);
>
>  -       cgrp->flags = 0;
>         INIT_LIST_HEAD(&cgrp->sibling);
>         INIT_LIST_HEAD(&cgrp->children);
>         INIT_LIST_HEAD(&cgrp->css_sets);
>  @@ -2242,6 +2241,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
>         cgrp->root = parent->root;
>         cgrp->top_cgroup = parent->top_cgroup;
>
>  +       if (notify_on_release(parent))
>  +               set_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags);
>  +
>         for_each_subsys(root, ss) {
>                 struct cgroup_subsys_state *css = ss->create(ss, cgrp);
>                 if (IS_ERR(css)) {
>  --
>  1.5.4.rc3
>
>
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] cgroup: fix default notify_on_release setting [message #27742 is a reply to message #27726] Tue, 26 February 2008 04:30 Go to previous message
Paul Jackson is currently offline  Paul Jackson
Messages: 157
Registered: February 2006
Senior Member
>  @@ -2242,6 +2241,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
>         cgrp->root = parent->root;
>         cgrp->top_cgroup = parent->top_cgroup;
>
>  +       if (notify_on_release(parent))
>  +               set_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags);


Good catch, Li Zefan - thanks.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [RFC] Remove kern_mount() in init_devpts_fs()
Next Topic: [PATCH 0/4] Devices accessibility control group (v3, release candidate)
Goto Forum:
  


Current Time: Tue Jul 16 23:29:45 GMT 2024

Total time taken to generate the page: 0.02948 seconds