linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memcg: fix mapcount check in move charge code for anonymous page
@ 2012-03-02 20:35 Naoya Horiguchi
  2012-03-05  0:17 ` Daisuke Nishimura
  2012-03-08  5:48 ` KAMEZAWA Hiroyuki
  0 siblings, 2 replies; 7+ messages in thread
From: Naoya Horiguchi @ 2012-03-02 20:35 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Andrea Arcangeli, KAMEZAWA Hiroyuki,
	Daisuke Nishimura, Hillf Danton, linux-kernel, Naoya Horiguchi

Currently charge on shared anonyous pages is supposed not to moved
in task migration. To implement this, we need to check that mapcount > 1,
instread of > 2. So this patch fixes it.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git linux-next-20120228.orig/mm/memcontrol.c linux-next-20120228/mm/memcontrol.c
index b6d1bab..785f6d3 100644
--- linux-next-20120228.orig/mm/memcontrol.c
+++ linux-next-20120228/mm/memcontrol.c
@@ -5102,7 +5102,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,
 		return NULL;
 	if (PageAnon(page)) {
 		/* we don't move shared anon */
-		if (!move_anon() || page_mapcount(page) > 2)
+		if (!move_anon() || page_mapcount(page) > 1)
 			return NULL;
 	} else if (!move_file())
 		/* we ignore mapcount for file pages */
-- 
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-08  6:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-02 20:35 [PATCH] memcg: fix mapcount check in move charge code for anonymous page Naoya Horiguchi
2012-03-05  0:17 ` Daisuke Nishimura
2012-03-06 20:55   ` Hugh Dickins
2012-03-06 23:31     ` Naoya Horiguchi
2012-03-07  1:29       ` Hugh Dickins
2012-03-08  6:08       ` KAMEZAWA Hiroyuki
2012-03-08  5:48 ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox