memcg-thp-swap-support-move-mem-cgroup-charge-for-thp-swapped-out.patch removed from -mm tree
The patch titled
Subject: memcg, THP, swap: support move mem cgroup charge for THP swapped out
has been removed from the -mm tree. Its filename was
memcg-thp-swap-support-move-mem-cgroup-charge-for-thp-swapped-out.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Huang Ying <[email protected]>
Subject: memcg, THP, swap: support move mem cgroup charge for THP swapped out
PTE mapped THP (Transparent Huge Page) will be ignored when moving memory cgroup charge. But for THP which is in the swap cache, the memory cgroup charge for the swap of a tail-page may be moved in current implementation. That isn't correct, because the swap charge for all sub-pages of a THP should be moved together. Following the processing of the PTE mapped THP, the mem cgroup charge moving for the swap entry for a tail-page of a THP is ignored too.
---
mm/memcontrol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-thp-swap-support-move-mem-cgroup-charge-for-thp-swapped-out +5 -2
@@ -4639,8 +4639,11 @@ static enum mc_target_type get_mctgt_typif (!ret || !target)put_page (page); } -/* There is a swap entry and a page doesn't exist or isn't charged */ -if (ent.val && !ret && +/* +* There is a swap entry and a page doesn't exist or isn't charged. +* But we cannot move a tail-page in a THP. +*/ +if (ent.val && !ret && (!page || !PageTransCompound (page)) &&mem_cgroup_id (mc.from) ==lookup_swap_cgroup_id (ent)) { ret =MC_TARGET_SWAP ;if (target)
_
Patches currently in -mm which might be from [email protected] are