* + mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint.patch added to mm-unstable branch
@ 2022-07-08 21:05 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-07-08 21:05 UTC (permalink / raw)
To: mm-commits, ziy, willy, vbabka, tsbogend, songliubraving, sj,
shy828301, rongwei.wang, rientjes, peterx, pasha.tatashin,
minchan, mhocko, mattst88, linmiaohe, kirill.shutemov, jcmvbkbc,
James.Bottomley, ink, hughd, deller, david, ckennelly, chris,
axelrasmussen, axboe, asml.silence, arnd, alex.shi, aarcange,
zokeefe, akpm
The patch titled
Subject: mm/madvise: add huge_memory:mm_madvise_collapse tracepoint
has been added to the -mm mm-unstable branch. Its filename is
mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: "Zach O'Keefe" <zokeefe@google.com>
Subject: mm/madvise: add huge_memory:mm_madvise_collapse tracepoint
Date: Wed, 6 Jul 2022 16:59:29 -0700
Add a tracepoint to expose mm, address, and enum scan_result of each
hugepage attempted to be collapsed by call to madvise(MADV_COLLAPSE).
Link: https://lkml.kernel.org/r/20220706235936.2197195-12-zokeefe@google.com
Signed-off-by: Zach O'Keefe <zokeefe@google.com>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Chris Kennelly <ckennelly@google.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rongwei Wang <rongwei.wang@linux.alibaba.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/trace/events/huge_memory.h | 22 ++++++++++++++++++++++
mm/khugepaged.c | 2 ++
2 files changed, 24 insertions(+)
--- a/include/trace/events/huge_memory.h~mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint
+++ a/include/trace/events/huge_memory.h
@@ -167,5 +167,27 @@ TRACE_EVENT(mm_collapse_huge_page_swapin
__entry->ret)
);
+TRACE_EVENT(mm_madvise_collapse,
+
+ TP_PROTO(struct mm_struct *mm, unsigned long addr, int result),
+
+ TP_ARGS(mm, addr, result),
+
+ TP_STRUCT__entry(__field(struct mm_struct *, mm)
+ __field(unsigned long, addr)
+ __field(int, result)
+ ),
+
+ TP_fast_assign(__entry->mm = mm;
+ __entry->addr = addr;
+ __entry->result = result;
+ ),
+
+ TP_printk("mm=%p addr=%#lx result=%s",
+ __entry->mm,
+ __entry->addr,
+ __print_symbolic(__entry->result, SCAN_STATUS))
+);
+
#endif /* __HUGE_MEMORY_H */
#include <trace/define_trace.h>
--- a/mm/khugepaged.c~mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint
+++ a/mm/khugepaged.c
@@ -2438,6 +2438,8 @@ int madvise_collapse(struct vm_area_stru
if (!mmap_locked)
*prev = NULL; /* Tell caller we dropped mmap_lock */
+ trace_mm_madvise_collapse(mm, addr, result);
+
switch (result) {
case SCAN_SUCCEED:
case SCAN_PMD_MAPPED:
_
Patches currently in -mm which might be from zokeefe@google.com are
mm-khugepaged-remove-redundant-transhuge_vma_suitable-check.patch
mm-khugepaged-add-struct-collapse_control.patch
mm-khugepaged-dedup-and-simplify-hugepage-alloc-and-charging.patch
mm-khugepaged-pipe-enum-scan_result-codes-back-to-callers.patch
mm-khugepaged-add-flag-to-predicate-khugepaged-only-behavior.patch
mm-thp-add-flag-to-enforce-sysfs-thp-in-hugepage_vma_check.patch
mm-khugepaged-record-scan_pmd_mapped-when-scan_pmd-finds-hugepage.patch
mm-madvise-introduce-madv_collapse-sync-hugepage-collapse.patch
mm-khugepaged-rename-prefix-of-shared-collapse-functions.patch
mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint.patch
mm-madvise-add-madv_collapse-to-process_madvise.patch
proc-smaps-add-pmdmappable-field-to-smaps.patch
selftests-vm-modularize-collapse-selftests.patch
selftests-vm-dedup-hugepage-allocation-logic.patch
selftests-vm-add-madv_collapse-collapse-context-to-selftests.patch
selftests-vm-add-selftest-to-verify-recollapse-of-thps.patch
selftests-vm-add-selftest-to-verify-multi-thp-collapse.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-08 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-08 21:05 + mm-madvise-add-huge_memory-mm_madvise_collapse-tracepoint.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.