aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiang Huang <h.huangqiang@huawei.com>2014-06-04 19:08:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:06 -0400
commitb5ffc8560cf758422e85b786cca32cd7e1513a7f (patch)
treef0f7df8283a94d89f7941f6f0460f85d144448f4
parentbdcbb659fe630fc64f6604e99a180bb2ccc630c2 (diff)
memcg: correct comments for __mem_cgroup_begin_update_page_stat
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/memcontrol.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4a9dfc83643d..971d7b643f6e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2276,12 +2276,11 @@ cleanup:
2276} 2276}
2277 2277
2278/* 2278/*
2279 * Currently used to update mapped file statistics, but the routine can be 2279 * Used to update mapped file or writeback or other statistics.
2280 * generalized to update other statistics as well.
2281 * 2280 *
2282 * Notes: Race condition 2281 * Notes: Race condition
2283 * 2282 *
2284 * We usually use page_cgroup_lock() for accessing page_cgroup member but 2283 * We usually use lock_page_cgroup() for accessing page_cgroup member but
2285 * it tends to be costly. But considering some conditions, we doesn't need 2284 * it tends to be costly. But considering some conditions, we doesn't need
2286 * to do so _always_. 2285 * to do so _always_.
2287 * 2286 *
@@ -2295,8 +2294,8 @@ cleanup:
2295 * by flags. 2294 * by flags.
2296 * 2295 *
2297 * Considering "move", this is an only case we see a race. To make the race 2296 * Considering "move", this is an only case we see a race. To make the race
2298 * small, we check mm->moving_account and detect there are possibility of race 2297 * small, we check memcg->moving_account and detect there are possibility
2299 * If there is, we take a lock. 2298 * of race or not. If there is, we take a lock.
2300 */ 2299 */
2301 2300
2302void __mem_cgroup_begin_update_page_stat(struct page *page, 2301void __mem_cgroup_begin_update_page_stat(struct page *page,