The patch titled Subject: mm: memcontrol: catch root bypass in move precharge has been removed from the -mm tree. Its filename was mm-memcontrol-catch-root-bypass-in-move-precharge.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm: memcontrol: catch root bypass in move precharge When mem_cgroup_try_charge() returns -EINTR, it bypassed the charge to the root memcg. But move precharging does not catch this and treats this case as if no charge had happened, thus leaking a charge against root. Because of an old optimization, the root memcg's res_counter is not actually charged right now, but it's still an imbalance and subsequent patches will charge the root memcg again. Catch those bypasses to the root memcg and properly cancel them before giving up the move. Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff -puN mm/memcontrol.c~mm-memcontrol-catch-root-bypass-in-move-precharge mm/memcontrol.c --- a/mm/memcontrol.c~mm-memcontrol-catch-root-bypass-in-move-precharge +++ a/mm/memcontrol.c @@ -6401,6 +6401,10 @@ static int mem_cgroup_do_precharge(unsig mc.precharge += count; return ret; } + if (ret == -EINTR) { + __mem_cgroup_cancel_charge(root_mem_cgroup, count); + return ret; + } /* Try charges one by one with reclaim */ while (count--) { @@ -6409,8 +6413,11 @@ static int mem_cgroup_do_precharge(unsig /* * In case of failure, any residual charges against * mc.to will be dropped by mem_cgroup_clear_mc() - * later on. + * later on. However, cancel any charges that are + * bypassed to root right away or they'll be lost. */ + if (ret == -EINTR) + __mem_cgroup_cancel_charge(root_mem_cgroup, 1); if (ret) return ret; mc.precharge++; _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are origin.patch mm-memcontrol-rewrite-charge-api.patch mm-memcontrol-rewrite-uncharge-api.patch mm-memcontrol-use-page-lists-for-uncharge-batching.patch mm-memcontrol-use-page-lists-for-uncharge-batching-fix-hugetlb-page-lru.patch page-cgroup-trivial-cleanup.patch page-cgroup-get-rid-of-nr_pcg_flags.patch memcg-remove-lookup_cgroup_page-prototype.patch mm-memcontrol-avoid-charge-statistics-churn-during-page-migration.patch nilfs2-integrate-sysfs-support-into-driver-fix.patch linux-next.patch debugging-keep-track-of-page-owners.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html