All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fixups for memcg cgroup_lock conversion
@ 2013-02-11  8:04 Glauber Costa
  2013-02-11  8:04 ` [PATCH 1/2] memcg: fast hierarchy-aware child test fix Glauber Costa
  2013-02-11  8:04   ` Glauber Costa
  0 siblings, 2 replies; 11+ messages in thread
From: Glauber Costa @ 2013-02-11  8:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tejun Heo, linux-mm, cgroups, Michal Hocko, Johannes Weiner,
	kamezawa.hiroyu

Andrew,

Please consider applying the following fixups to two of the patches
in my latest cgroup_lock conversion series. Apparently, there were
some mistake while converting one of the functions,
mem_cgroup_oom_control_write. Smatch found this one due in kbuild
to the lock imbalance when exiting the function.

Names should be already in your fixup format.

Glauber Costa (2):
  memcg: fast hierarchy-aware child test fix
  memcg: replace cgroup_lock with memcg specific memcg_lock fix

 mm/memcontrol.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
1.8.1.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] memcg: fast hierarchy-aware child test fix
  2013-02-11  8:04 [PATCH 0/2] fixups for memcg cgroup_lock conversion Glauber Costa
@ 2013-02-11  8:04 ` Glauber Costa
  2013-02-11  9:04   ` Michal Hocko
  2013-02-13 10:42     ` Kamezawa Hiroyuki
  2013-02-11  8:04   ` Glauber Costa
  1 sibling, 2 replies; 11+ messages in thread
From: Glauber Costa @ 2013-02-11  8:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tejun Heo, linux-mm, cgroups, Michal Hocko, Johannes Weiner,
	kamezawa.hiroyu

---
 mm/memcontrol.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 25ac5f4..28252c9 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
 
 	mutex_lock(&memcg_create_mutex);
 	/* oom-kill-disable is a flag for subhierarchy. */
-	if ((parent->use_hierarchy) ||
-	    (memcg->use_hierarchy && !list_empty(&cgrp->children))) {
+	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
 		cgroup_unlock();
 		return -EINVAL;
 	}
-- 
1.8.1.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-11  8:04   ` Glauber Costa
  0 siblings, 0 replies; 11+ messages in thread
From: Glauber Costa @ 2013-02-11  8:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tejun Heo, linux-mm, cgroups, Michal Hocko, Johannes Weiner,
	kamezawa.hiroyu, Glauber Costa

Signed-off-by: Glauber Costa <glommer@parallels.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 28252c9..03ebf68 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
 	mutex_lock(&memcg_create_mutex);
 	/* oom-kill-disable is a flag for subhierarchy. */
 	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
-		cgroup_unlock();
+		mutex_unlock(&memcg_create_mutex);
 		return -EINVAL;
 	}
 	memcg->oom_kill_disable = val;
-- 
1.8.1.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-11  8:04   ` Glauber Costa
  0 siblings, 0 replies; 11+ messages in thread
From: Glauber Costa @ 2013-02-11  8:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tejun Heo, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, Johannes Weiner,
	kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A, Glauber Costa

Signed-off-by: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 28252c9..03ebf68 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
 	mutex_lock(&memcg_create_mutex);
 	/* oom-kill-disable is a flag for subhierarchy. */
 	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
-		cgroup_unlock();
+		mutex_unlock(&memcg_create_mutex);
 		return -EINVAL;
 	}
 	memcg->oom_kill_disable = val;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] memcg: fast hierarchy-aware child test fix
  2013-02-11  8:04 ` [PATCH 1/2] memcg: fast hierarchy-aware child test fix Glauber Costa
@ 2013-02-11  9:04   ` Michal Hocko
  2013-02-13 10:42     ` Kamezawa Hiroyuki
  1 sibling, 0 replies; 11+ messages in thread
From: Michal Hocko @ 2013-02-11  9:04 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm, cgroups, Johannes Weiner,
	kamezawa.hiroyu

Acked-by: Michal Hocko <mhocko@suse.cz>

On Mon 11-02-13 12:04:48, Glauber Costa wrote:
> ---
>  mm/memcontrol.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 25ac5f4..28252c9 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>  
>  	mutex_lock(&memcg_create_mutex);
>  	/* oom-kill-disable is a flag for subhierarchy. */
> -	if ((parent->use_hierarchy) ||
> -	    (memcg->use_hierarchy && !list_empty(&cgrp->children))) {
> +	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
>  		cgroup_unlock();
>  		return -EINVAL;
>  	}
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-11  9:04     ` Michal Hocko
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Hocko @ 2013-02-11  9:04 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm, cgroups, Johannes Weiner,
	kamezawa.hiroyu

Ouch, I have totally missed this one.
Acked-by: Michal Hocko <mhocko@suse.cz>

On Mon 11-02-13 12:04:49, Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer@parallels.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 28252c9..03ebf68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>  	mutex_lock(&memcg_create_mutex);
>  	/* oom-kill-disable is a flag for subhierarchy. */
>  	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
> -		cgroup_unlock();
> +		mutex_unlock(&memcg_create_mutex);
>  		return -EINVAL;
>  	}
>  	memcg->oom_kill_disable = val;
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-11  9:04     ` Michal Hocko
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Hocko @ 2013-02-11  9:04 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Johannes Weiner,
	kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A

Ouch, I have totally missed this one.
Acked-by: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>

On Mon 11-02-13 12:04:49, Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
> Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 28252c9..03ebf68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>  	mutex_lock(&memcg_create_mutex);
>  	/* oom-kill-disable is a flag for subhierarchy. */
>  	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
> -		cgroup_unlock();
> +		mutex_unlock(&memcg_create_mutex);
>  		return -EINVAL;
>  	}
>  	memcg->oom_kill_disable = val;
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] memcg: fast hierarchy-aware child test fix
@ 2013-02-13 10:42     ` Kamezawa Hiroyuki
  0 siblings, 0 replies; 11+ messages in thread
From: Kamezawa Hiroyuki @ 2013-02-13 10:42 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm, cgroups, Michal Hocko,
	Johannes Weiner

(2013/02/11 17:04), Glauber Costa wrote:
> ---
>   mm/memcontrol.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 25ac5f4..28252c9 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>   
>   	mutex_lock(&memcg_create_mutex);
>   	/* oom-kill-disable is a flag for subhierarchy. */
> -	if ((parent->use_hierarchy) ||
> -	    (memcg->use_hierarchy && !list_empty(&cgrp->children))) {
> +	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
>   		cgroup_unlock();
>   		return -EINVAL;
>   	}
> 

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] memcg: fast hierarchy-aware child test fix
@ 2013-02-13 10:42     ` Kamezawa Hiroyuki
  0 siblings, 0 replies; 11+ messages in thread
From: Kamezawa Hiroyuki @ 2013-02-13 10:42 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, Johannes Weiner

(2013/02/11 17:04), Glauber Costa wrote:
> ---
>   mm/memcontrol.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 25ac5f4..28252c9 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>   
>   	mutex_lock(&memcg_create_mutex);
>   	/* oom-kill-disable is a flag for subhierarchy. */
> -	if ((parent->use_hierarchy) ||
> -	    (memcg->use_hierarchy && !list_empty(&cgrp->children))) {
> +	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
>   		cgroup_unlock();
>   		return -EINVAL;
>   	}
> 

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-13 10:43     ` Kamezawa Hiroyuki
  0 siblings, 0 replies; 11+ messages in thread
From: Kamezawa Hiroyuki @ 2013-02-13 10:43 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm, cgroups, Michal Hocko,
	Johannes Weiner

(2013/02/11 17:04), Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer@parallels.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

I'm sorry I missed this...
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

> ---
>   mm/memcontrol.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 28252c9..03ebf68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>   	mutex_lock(&memcg_create_mutex);
>   	/* oom-kill-disable is a flag for subhierarchy. */
>   	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
> -		cgroup_unlock();
> +		mutex_unlock(&memcg_create_mutex);
>   		return -EINVAL;
>   	}
>   	memcg->oom_kill_disable = val;
> 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
@ 2013-02-13 10:43     ` Kamezawa Hiroyuki
  0 siblings, 0 replies; 11+ messages in thread
From: Kamezawa Hiroyuki @ 2013-02-13 10:43 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Andrew Morton, Tejun Heo, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, Johannes Weiner

(2013/02/11 17:04), Glauber Costa wrote:
> Signed-off-by: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
> Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

I'm sorry I missed this...
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

> ---
>   mm/memcontrol.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 28252c9..03ebf68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>   	mutex_lock(&memcg_create_mutex);
>   	/* oom-kill-disable is a flag for subhierarchy. */
>   	if ((parent->use_hierarchy) || memcg_has_children(memcg)) {
> -		cgroup_unlock();
> +		mutex_unlock(&memcg_create_mutex);
>   		return -EINVAL;
>   	}
>   	memcg->oom_kill_disable = val;
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-13 10:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11  8:04 [PATCH 0/2] fixups for memcg cgroup_lock conversion Glauber Costa
2013-02-11  8:04 ` [PATCH 1/2] memcg: fast hierarchy-aware child test fix Glauber Costa
2013-02-11  9:04   ` Michal Hocko
2013-02-13 10:42   ` Kamezawa Hiroyuki
2013-02-13 10:42     ` Kamezawa Hiroyuki
2013-02-11  8:04 ` [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix Glauber Costa
2013-02-11  8:04   ` Glauber Costa
2013-02-11  9:04   ` Michal Hocko
2013-02-11  9:04     ` Michal Hocko
2013-02-13 10:43   ` Kamezawa Hiroyuki
2013-02-13 10:43     ` Kamezawa Hiroyuki

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.