All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-17  1:41 ` linmiaohe
  0 siblings, 0 replies; 6+ messages in thread
From: linmiaohe @ 2020-09-17  1:41 UTC (permalink / raw)
  To: Michal Hocko; +Cc: hannes, vdavydov.dev, akpm, cgroups, linux-mm, linux-kernel

Michal Hocko <mhocko@suse.com> wrote:
> On Wed 16-09-20 09:19:27, Miaohe Lin wrote:
>> Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting 
>> and wakeup"), we have renamed mem_cgroup_oom_lock to 
>> mem_cgroup_oom_trylock. So replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.
>
>While you are right I find the comment more confusing then helpful.
>What does it try to tell us actually? Is it still valid? Shouldn't we rather remove it or make it more clear?
>> 

It seems this comment no long make sense. Many thanks for your nice advise.


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

* Re: [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-17  1:41 ` linmiaohe
  0 siblings, 0 replies; 6+ messages in thread
From: linmiaohe @ 2020-09-17  1:41 UTC (permalink / raw)
  To: Michal Hocko
  Cc: hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org> wrote:
> On Wed 16-09-20 09:19:27, Miaohe Lin wrote:
>> Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting 
>> and wakeup"), we have renamed mem_cgroup_oom_lock to 
>> mem_cgroup_oom_trylock. So replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.
>
>While you are right I find the comment more confusing then helpful.
>What does it try to tell us actually? Is it still valid? Shouldn't we rather remove it or make it more clear?
>> 

It seems this comment no long make sense. Many thanks for your nice advise.


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

* Re: [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-16 14:53   ` Michal Hocko
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Hocko @ 2020-09-16 14:53 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: hannes, vdavydov.dev, akpm, cgroups, linux-mm, linux-kernel

On Wed 16-09-20 09:19:27, Miaohe Lin wrote:
> Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting and
> wakeup"), we have renamed mem_cgroup_oom_lock to mem_cgroup_oom_trylock. So
> replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.

While you are right I find the comment more confusing then helpful.
What does it try to tell us actually? Is it still valid? Shouldn't we
rather remove it or make it more clear?
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 3d26b4b954e2..702aa4d7ebbc 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1846,7 +1846,7 @@ static void mem_cgroup_unmark_under_oom(struct mem_cgroup *memcg)
>  
>  	/*
>  	 * When a new child is created while the hierarchy is under oom,
> -	 * mem_cgroup_oom_lock() may not be called. Watch for underflow.
> +	 * mem_cgroup_oom_trylock() may not be called. Watch for underflow.
>  	 */
>  	spin_lock(&memcg_oom_lock);
>  	for_each_mem_cgroup_tree(iter, memcg)
> -- 
> 2.19.1

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-16 14:53   ` Michal Hocko
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Hocko @ 2020-09-16 14:53 UTC (permalink / raw)
  To: Miaohe Lin
  Cc: hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed 16-09-20 09:19:27, Miaohe Lin wrote:
> Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting and
> wakeup"), we have renamed mem_cgroup_oom_lock to mem_cgroup_oom_trylock. So
> replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.

While you are right I find the comment more confusing then helpful.
What does it try to tell us actually? Is it still valid? Shouldn't we
rather remove it or make it more clear?
> 
> Signed-off-by: Miaohe Lin <linmiaohe-hv44wF8Li93QT0dZR+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 3d26b4b954e2..702aa4d7ebbc 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1846,7 +1846,7 @@ static void mem_cgroup_unmark_under_oom(struct mem_cgroup *memcg)
>  
>  	/*
>  	 * When a new child is created while the hierarchy is under oom,
> -	 * mem_cgroup_oom_lock() may not be called. Watch for underflow.
> +	 * mem_cgroup_oom_trylock() may not be called. Watch for underflow.
>  	 */
>  	spin_lock(&memcg_oom_lock);
>  	for_each_mem_cgroup_tree(iter, memcg)
> -- 
> 2.19.1

-- 
Michal Hocko
SUSE Labs

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

* [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-16 13:19 ` Miaohe Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Miaohe Lin @ 2020-09-16 13:19 UTC (permalink / raw)
  To: hannes, mhocko, vdavydov.dev, akpm
  Cc: cgroups, linux-mm, linux-kernel, linmiaohe

Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting and
wakeup"), we have renamed mem_cgroup_oom_lock to mem_cgroup_oom_trylock. So
replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3d26b4b954e2..702aa4d7ebbc 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1846,7 +1846,7 @@ static void mem_cgroup_unmark_under_oom(struct mem_cgroup *memcg)
 
 	/*
 	 * When a new child is created while the hierarchy is under oom,
-	 * mem_cgroup_oom_lock() may not be called. Watch for underflow.
+	 * mem_cgroup_oom_trylock() may not be called. Watch for underflow.
 	 */
 	spin_lock(&memcg_oom_lock);
 	for_each_mem_cgroup_tree(iter, memcg)
-- 
2.19.1


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

* [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom()
@ 2020-09-16 13:19 ` Miaohe Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Miaohe Lin @ 2020-09-16 13:19 UTC (permalink / raw)
  To: hannes-druUgvl0LCNAfugRpC6u6w, mhocko-DgEjT+Ai2ygdnm+yROfE0A,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linmiaohe-hv44wF8Li93QT0dZR+AlfA

Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting and
wakeup"), we have renamed mem_cgroup_oom_lock to mem_cgroup_oom_trylock. So
replace mem_cgroup_oom_lock with mem_cgroup_oom_trylock in comment.

Signed-off-by: Miaohe Lin <linmiaohe-hv44wF8Li93QT0dZR+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 3d26b4b954e2..702aa4d7ebbc 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1846,7 +1846,7 @@ static void mem_cgroup_unmark_under_oom(struct mem_cgroup *memcg)
 
 	/*
 	 * When a new child is created while the hierarchy is under oom,
-	 * mem_cgroup_oom_lock() may not be called. Watch for underflow.
+	 * mem_cgroup_oom_trylock() may not be called. Watch for underflow.
 	 */
 	spin_lock(&memcg_oom_lock);
 	for_each_mem_cgroup_tree(iter, memcg)
-- 
2.19.1


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

end of thread, other threads:[~2020-09-17  1:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  1:41 [PATCH] mm: memcontrol: correct the comment of mem_cgroup_unmark_under_oom() linmiaohe
2020-09-17  1:41 ` linmiaohe
  -- strict thread matches above, loose matches on Subject: below --
2020-09-16 13:19 Miaohe Lin
2020-09-16 13:19 ` Miaohe Lin
2020-09-16 14:53 ` Michal Hocko
2020-09-16 14:53   ` Michal Hocko

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.