Skip to contentSkip to conversation

memcg: correct comments for __mem_cgroup_begin_update_page_stat

PATCH In review Qiang Huang 2 participants 2 messages May 7, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 memcg: correct comments for __mem_cgroup_begin_update_page_stat

---
 mm/memcontrol.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
mm/memcontrol.c +4 -5
index 5804d71..f96e68e 100644
@@ -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,
Signature · 1 line
1.8.3
Acked-by on v1 2/2
#1 lore raw
Quoted 2 lines · Qiang Huang

Looks good

Thanks!

Quoted 37 lines
---
 mm/memcontrol.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
mm/memcontrol.c +4 -5
index 5804d71..f96e68e 100644
@@ -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,
Signature · 1 line
1.8.3
Signature · 2 lines
Michal Hocko
SUSE Labs