* [PATCH] cgroup: fix default notify_on_release setting
@ 2008-02-25 5:53 Li Zefan
2008-02-25 6:22 ` Paul Menage
[not found] ` <47C257EB.5060600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
0 siblings, 2 replies; 6+ messages in thread
From: Li Zefan @ 2008-02-25 5:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: Paul Menage, LKML, containers
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] cgroup: fix default notify_on_release setting
2008-02-25 5:53 [PATCH] cgroup: fix default notify_on_release setting Li Zefan
@ 2008-02-25 6:22 ` Paul Menage
2008-02-26 4:30 ` Paul Jackson
[not found] ` <6599ad830802242222p7d42d2b2ue7c585eae8f3bed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[not found] ` <47C257EB.5060600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
1 sibling, 2 replies; 6+ messages in thread
From: Paul Menage @ 2008-02-25 6:22 UTC (permalink / raw)
To: Li Zefan; +Cc: Andrew Morton, LKML, containers
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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] cgroup: fix default notify_on_release setting
2008-02-25 6:22 ` Paul Menage
@ 2008-02-26 4:30 ` Paul Jackson
[not found] ` <6599ad830802242222p7d42d2b2ue7c585eae8f3bed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
1 sibling, 0 replies; 6+ messages in thread
From: Paul Jackson @ 2008-02-26 4:30 UTC (permalink / raw)
To: Paul Menage; +Cc: lizf, containers, akpm, linux-kernel
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <6599ad830802242222p7d42d2b2ue7c585eae8f3bed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] cgroup: fix default notify_on_release setting
[not found] ` <6599ad830802242222p7d42d2b2ue7c585eae8f3bed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-02-26 4:30 ` Paul Jackson
0 siblings, 0 replies; 6+ messages in thread
From: Paul Jackson @ 2008-02-26 4:30 UTC (permalink / raw)
To: Paul Menage
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
lizf-BthXqXjhjHXQFUHtdCDX3A,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
> @@ -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-sJ/iWh9BUns@public.gmane.org> 1.940.382.4214
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <47C257EB.5060600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH] cgroup: fix default notify_on_release setting
[not found] ` <47C257EB.5060600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2008-02-25 6:22 ` Paul Menage
0 siblings, 0 replies; 6+ messages in thread
From: Paul Menage @ 2008-02-25 6:22 UTC (permalink / raw)
To: Li Zefan
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Andrew Morton, LKML
On Sun, Feb 24, 2008 at 9:53 PM, Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 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-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Acked-by: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] cgroup: fix default notify_on_release setting
@ 2008-02-25 5:53 Li Zefan
0 siblings, 0 replies; 6+ messages in thread
From: Li Zefan @ 2008-02-25 5:53 UTC (permalink / raw)
To: Andrew Morton
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Paul Menage, LKML
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-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-26 4:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-25 5:53 [PATCH] cgroup: fix default notify_on_release setting Li Zefan
2008-02-25 6:22 ` Paul Menage
2008-02-26 4:30 ` Paul Jackson
[not found] ` <6599ad830802242222p7d42d2b2ue7c585eae8f3bed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-26 4:30 ` Paul Jackson
[not found] ` <47C257EB.5060600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-02-25 6:22 ` Paul Menage
-- strict thread matches above, loose matches on Subject: below --
2008-02-25 5:53 Li Zefan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.