aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2012-03-09 16:37:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-09 18:32:20 -0500
commitbe22aece684f5a700e6247b9861c3759d5798a3c (patch)
tree07d423a2cdb16140e8704a69788f8b9bd5ddbe13 /mm
parenta7f4255f906f60f72e00aad2fb000939449ff32e (diff)
memcg: revert fix to mapcount check for this release
Respectfully revert commit e6ca7b89dc76 "memcg: fix mapcount check in move charge code for anonymous page" for the 3.3 release, so that it behaves exactly like releases 2.6.35 through 3.2 in this respect. Horiguchi-san's commit is correct in itself, 1 makes much more sense than 2 in that check; but it does not go far enough - swapcount should be considered too - if we really want such a check at all. We appear to have reached agreement now, and expect that 3.4 will remove the mapcount check, but had better not make 3.3 different. Signed-off-by: Hugh Dickins <hughd@google.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5585dc3d3646..d0e57a3cda18 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5075,7 +5075,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,
5075 return NULL; 5075 return NULL;
5076 if (PageAnon(page)) { 5076 if (PageAnon(page)) {
5077 /* we don't move shared anon */ 5077 /* we don't move shared anon */
5078 if (!move_anon() || page_mapcount(page) > 1) 5078 if (!move_anon() || page_mapcount(page) > 2)
5079 return NULL; 5079 return NULL;
5080 } else if (!move_file()) 5080 } else if (!move_file())
5081 /* we ignore mapcount for file pages */ 5081 /* we ignore mapcount for file pages */