Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Hugh Dickins and committed by
Linus Torvalds
be22aece a7f4255f

+1 -1
+1 -1
mm/memcontrol.c
··· 5075 5075 return NULL; 5076 5076 if (PageAnon(page)) { 5077 5077 /* we don't move shared anon */ 5078 - if (!move_anon() || page_mapcount(page) > 1) 5078 + if (!move_anon() || page_mapcount(page) > 2) 5079 5079 return NULL; 5080 5080 } else if (!move_file()) 5081 5081 /* we ignore mapcount for file pages */