From 632558838f55d9e5489e6d7e21a94d50c0c8079f Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 3 May 2012 15:44:01 +1000 Subject: [PATCH] memcg-add-mlock-statistic-in-memorystat-fix tweak comments Cc: Dan Magenheimer Cc: Hillf Danton Cc: Hugh Dickins Cc: Johannes Weiner Cc: KAMEZAWA Hiroyuki Cc: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Ying Han Signed-off-by: Andrew Morton --- mm/internal.h | 4 ++-- mm/mlock.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index dfe0a7da9c00..09a4a88253d2 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -222,8 +222,8 @@ static inline void mlock_migrate_page(struct page *newpage, struct page *page) { /* * Here we are supposed to update the page memcg's mlock stat and the - * newpage memcgs' mlock. Since the page and newpage are always being - * charged to the same memcg, so no need. + * newpage memcgs' mlock. Since the two pages are always being charged + * to the same memcg there is no need for this. */ if (TestClearPageMlocked(page)) { unsigned long flags; diff --git a/mm/mlock.c b/mm/mlock.c index cef020158aae..2fd967a324f7 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -49,9 +49,9 @@ EXPORT_SYMBOL(can_do_mlock); */ /* - * LRU accounting for clear_page_mlock() - * Make sure the caller calls mem_cgroup_begin[end]_update_page_stat, - * otherwise it will be race between "move" and "page stat accounting". + * LRU accounting for clear_page_mlock() + * The caller must use mem_cgroup_begin[end]_update_page_stat to prevent a race + * between "move" and "page stat accounting". */ void __clear_page_mlock(struct page *page) { -- 2.39.5