* [merged mm-stable] mm-khugepaged-cleanup-memcg-uncharge-for-failure-path.patch removed from -mm tree
@ 2023-03-28 23:21 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-03-28 23:21 UTC (permalink / raw)
To: mm-commits, zokeefe, stevensd, shy828301, hannes, peterx, akpm
The quilt patch titled
Subject: mm/khugepaged: cleanup memcg uncharge for failure path
has been removed from the -mm tree. Its filename was
mm-khugepaged-cleanup-memcg-uncharge-for-failure-path.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Peter Xu <peterx@redhat.com>
Subject: mm/khugepaged: cleanup memcg uncharge for failure path
Date: Fri, 3 Mar 2023 10:12:18 -0500
Explicit memcg uncharging is not needed when the memcg accounting has the
same lifespan of the page/folio. That becomes the case for khugepaged
after Yang & Zach's recent rework so the hpage will be allocated for each
collapse rather than being cached.
Cleanup the explicit memcg uncharge in khugepaged failure path and leave
that for put_page().
Link: https://lkml.kernel.org/r/20230303151218.311015-1-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Suggested-by: Zach O'Keefe <zokeefe@google.com>
Reviewed-by: Zach O'Keefe <zokeefe@google.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: David Stevens <stevensd@chromium.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/khugepaged.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- a/mm/khugepaged.c~mm-khugepaged-cleanup-memcg-uncharge-for-failure-path
+++ a/mm/khugepaged.c
@@ -1136,10 +1136,8 @@ static int collapse_huge_page(struct mm_
out_up_write:
mmap_write_unlock(mm);
out_nolock:
- if (hpage) {
- mem_cgroup_uncharge(page_folio(hpage));
+ if (hpage)
put_page(hpage);
- }
trace_mm_collapse_huge_page(mm, result == SCAN_SUCCEED, result);
return result;
}
@@ -2145,10 +2143,8 @@ xa_unlocked:
unlock_page(hpage);
out:
VM_BUG_ON(!list_empty(&pagelist));
- if (hpage) {
- mem_cgroup_uncharge(page_folio(hpage));
+ if (hpage)
put_page(hpage);
- }
trace_mm_khugepaged_collapse_file(mm, hpage, index, is_shmem, addr, file, nr, result);
return result;
_
Patches currently in -mm which might be from peterx@redhat.com are
mm-hugetlb-fix-uffd-wr-protection-for-cow-optimization-path.patch
mm-hugetlb-fix-uffd-wr-protection-for-cow-optimization-path-v2.patch
mm-hugetlb-fix-uffd-wr-protection-for-cow-optimization-path-v3.patch
mm-uffd-uffd_feature_wp_unpopulated.patch
mm-uffd-uffd_feature_wp_unpopulated-fix.patch
selftests-mm-smoke-test-uffd_feature_wp_unpopulated.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-28 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 23:21 [merged mm-stable] mm-khugepaged-cleanup-memcg-uncharge-for-failure-path.patch removed from -mm tree Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).