+ mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: move mem_cgroup_uncharge out of __page_cache_release()
has been added to the -mm tree.  Its filename is
     mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Subject: mm: move mem_cgroup_uncharge out of __page_cache_release()

A later patch makes THP deferred split shrinker memcg aware, but it needs
page->mem_cgroup information in THP destructor, which is called after
mem_cgroup_uncharge() now.

So, move mem_cgroup_uncharge() from __page_cache_release() to compound
page destructor, which is called by both THP and other compound pages
except HugeTLB.  And call it in __put_single_page() for zero order page.

Link: http://lkml.kernel.org/r/1560376609-113689-3-git-send-email-yang.shi@xxxxxxxxxxxxxxxxx
Suggested-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Signed-off-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Shakeel Butt <shakeelb@xxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    1 +
 mm/swap.c       |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/mm/page_alloc.c~mm-move-mem_cgroup_uncharge-out-of-__page_cache_release
+++ a/mm/page_alloc.c
@@ -623,6 +623,7 @@ out:
 
 void free_compound_page(struct page *page)
 {
+	mem_cgroup_uncharge(page);
 	__free_pages_ok(page, compound_order(page));
 }
 
--- a/mm/swap.c~mm-move-mem_cgroup_uncharge-out-of-__page_cache_release
+++ a/mm/swap.c
@@ -71,12 +71,12 @@ static void __page_cache_release(struct
 		spin_unlock_irqrestore(&pgdat->lru_lock, flags);
 	}
 	__ClearPageWaiters(page);
-	mem_cgroup_uncharge(page);
 }
 
 static void __put_single_page(struct page *page)
 {
 	__page_cache_release(page);
+	mem_cgroup_uncharge(page);
 	free_unref_page(page);
 }
 
_

Patches currently in -mm which might be from yang.shi@xxxxxxxxxxxxxxxxx are

mm-filemap-correct-the-comment-about-vm_fault_retry.patch
mm-thp-extract-split_queue_-into-a-struct.patch
mm-move-mem_cgroup_uncharge-out-of-__page_cache_release.patch
mm-shrinker-make-shrinker-not-depend-on-memcg-kmem.patch
mm-thp-make-deferred-split-shrinker-memcg-aware.patch
mm-vmscan-remove-double-slab-pressure-by-incing-sc-nr_scanned.patch
mm-vmscan-correct-some-vmscan-counters-for-thp-swapout.patch
mm-mempolicy-make-the-behavior-consistent-when-mpol_mf_move-and-mpol_mf_strict-were-specified.patch
mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind.patch
mm-thp-make-transhuge_vma_suitable-available-for-anonymous-thp.patch
mm-thp-fix-false-negative-of-shmem-vmas-thp-eligibility.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux