linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] memcg: correct comments for __mem_cgroup_begin_update_page_stat
@ 2014-05-07  8:27 Qiang Huang
  2014-05-07  9:19 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Qiang Huang @ 2014-05-07  8:27 UTC (permalink / raw)
  To: Michal Hocko, Johannes Weiner, bsingharora, kamezawa.hiroyu
  Cc: Cgroups, linux-mm, Li Zefan, Andrew Morton


Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
---
 mm/memcontrol.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5804d71..f96e68e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2251,12 +2251,11 @@ cleanup:
 }

 /*
- * Currently used to update mapped file statistics, but the routine can be
- * generalized to update other statistics as well.
+ * Used to update mapped file or writeback or other statistics.
  *
  * Notes: Race condition
  *
- * We usually use page_cgroup_lock() for accessing page_cgroup member but
+ * We usually use lock_page_cgroup() for accessing page_cgroup member but
  * it tends to be costly. But considering some conditions, we doesn't need
  * to do so _always_.
  *
@@ -2270,8 +2269,8 @@ cleanup:
  * by flags.
  *
  * Considering "move", this is an only case we see a race. To make the race
- * small, we check mm->moving_account and detect there are possibility of race
- * If there is, we take a lock.
+ * small, we check memcg->moving_account and detect there are possibility
+ * of race or not. If there is, we take a lock.
  */

 void __mem_cgroup_begin_update_page_stat(struct page *page,
-- 
1.8.3

--
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] 2+ messages in thread

* Re: [PATCH 2/2] memcg: correct comments for __mem_cgroup_begin_update_page_stat
  2014-05-07  8:27 [PATCH 2/2] memcg: correct comments for __mem_cgroup_begin_update_page_stat Qiang Huang
@ 2014-05-07  9:19 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2014-05-07  9:19 UTC (permalink / raw)
  To: Qiang Huang
  Cc: Johannes Weiner, bsingharora, kamezawa.hiroyu, Cgroups, linux-mm,
	Li Zefan, Andrew Morton

On Wed 07-05-14 16:27:13, Qiang Huang wrote:
> 
> Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>

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

Thanks!

> ---
>  mm/memcontrol.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 5804d71..f96e68e 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2251,12 +2251,11 @@ cleanup:
>  }
> 
>  /*
> - * Currently used to update mapped file statistics, but the routine can be
> - * generalized to update other statistics as well.
> + * Used to update mapped file or writeback or other statistics.
>   *
>   * Notes: Race condition
>   *
> - * We usually use page_cgroup_lock() for accessing page_cgroup member but
> + * We usually use lock_page_cgroup() for accessing page_cgroup member but
>   * it tends to be costly. But considering some conditions, we doesn't need
>   * to do so _always_.
>   *
> @@ -2270,8 +2269,8 @@ cleanup:
>   * by flags.
>   *
>   * Considering "move", this is an only case we see a race. To make the race
> - * small, we check mm->moving_account and detect there are possibility of race
> - * If there is, we take a lock.
> + * small, we check memcg->moving_account and detect there are possibility
> + * of race or not. If there is, we take a lock.
>   */
> 
>  void __mem_cgroup_begin_update_page_stat(struct page *page,
> -- 
> 1.8.3
> 

-- 
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] 2+ messages in thread

end of thread, other threads:[~2014-05-07  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07  8:27 [PATCH 2/2] memcg: correct comments for __mem_cgroup_begin_update_page_stat Qiang Huang
2014-05-07  9:19 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox