mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
memcg: fix mapcount check in move charge code for anonymous page
Currently the 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 <[email protected]> Reviewed-by: Daisuke Nishimura <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1c641e8471
commit
e6ca7b89dc
1 changed files with 1 additions and 1 deletions
|
|
@ -5075,7 +5075,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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue