The patch titled Subject: mm: memcontrol: uncharge pages on swapout has been removed from the -mm tree. Its filename was mm-memcontrol-uncharge-pages-on-swapout.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm: memcontrol: uncharge pages on swapout This series gets rid of the remaining page_cgroup flags, thus cutting the memcg per-page overhead down to one pointer. This patch (of 4): mem_cgroup_swapout() is called with exclusive access to the page at the end of the page's lifetime. Instead of clearing the PCG_MEMSW flag and deferring the uncharge, just do it right away. This allows follow-up patches to simplify the uncharge code. Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxx> Acked-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff -puN mm/memcontrol.c~mm-memcontrol-uncharge-pages-on-swapout mm/memcontrol.c --- a/mm/memcontrol.c~mm-memcontrol-uncharge-pages-on-swapout +++ a/mm/memcontrol.c @@ -5777,6 +5777,7 @@ static void __init enable_swap_cgroup(vo */ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) { + struct mem_cgroup *memcg; struct page_cgroup *pc; unsigned short oldid; @@ -5793,13 +5794,22 @@ void mem_cgroup_swapout(struct page *pag return; VM_BUG_ON_PAGE(!(pc->flags & PCG_MEMSW), page); + memcg = pc->mem_cgroup; - oldid = swap_cgroup_record(entry, mem_cgroup_id(pc->mem_cgroup)); + oldid = swap_cgroup_record(entry, mem_cgroup_id(memcg)); VM_BUG_ON_PAGE(oldid, page); + mem_cgroup_swap_statistics(memcg, true); - pc->flags &= ~PCG_MEMSW; - css_get(&pc->mem_cgroup->css); - mem_cgroup_swap_statistics(pc->mem_cgroup, true); + pc->flags = 0; + + if (!mem_cgroup_is_root(memcg)) + page_counter_uncharge(&memcg->memory, 1); + + /* XXX: caller holds IRQ-safe mapping->tree_lock */ + VM_BUG_ON(!irqs_disabled()); + + mem_cgroup_charge_statistics(memcg, page, -1); + memcg_check_events(memcg, page); } /** _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are origin.patch memcg-__mem_cgroup_free-remove-stale-disarm_static_keys-comment.patch memcg-dont-check-mm-in-__memcg_kmem_get_cachenewpage_charge.patch memcg-do-not-abuse-memcg_kmem_skip_account.patch mm-page_allocc-__alloc_pages_nodemask-dont-alter-arg-gfp_mask.patch mm-mincore-add-hwpoison-page-handle.patch memcg-zap-kmem_account_flags.patch memcg-only-check-memcg_kmem_skip_account-in-__memcg_kmem_get_cache.patch memcg-turn-memcg_kmem_skip_account-into-a-bit-field.patch mm-move-swp_entry_t-definition-to-include-linux-mm_typesh.patch mm-gfp-escalatedly-define-gfp_highuser-and-gfp_highuser_movable.patch mm-page_ext-resurrect-struct-page-extending-code-for-debugging.patch mm-page_ext-resurrect-struct-page-extending-code-for-debugging-fix.patch mm-debug-pagealloc-prepare-boottime-configurable-on-off.patch mm-debug-pagealloc-make-debug-pagealloc-boottime-configurable.patch mm-debug-pagealloc-make-debug-pagealloc-boottime-configurable-fix.patch mm-nommu-use-alloc_pages_exact-rather-than-its-own-implementation.patch stacktrace-introduce-snprint_stack_trace-for-buffer-output.patch mm-page_owner-keep-track-of-page-owners.patch mm-page_owner-correct-owner-information-for-early-allocated-pages.patch documentation-add-new-page_owner-document.patch mm-vmscan-invoke-slab-shrinkers-from-shrink_zone.patch mm-vmscan-invoke-slab-shrinkers-from-shrink_zone-fix.patch mm-page_alloc-embed-oom-killing-naturally-into-allocation-slowpath.patch mm-memcontrol-fix-defined-but-not-used-compiler-warning.patch memcg-fix-possible-use-after-free-in-memcg_kmem_get_cache.patch mm-memcontrolc-cleaning-up-function-that-are-not-used-anywhere.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