Skip to contentSkip to conversation

mm-page_alloc-add-trace-event-for-totalreserve_pages-calculation.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 18, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/page_alloc: add trace event for totalreserve_pages calculation
has been removed from the -mm tree. Its filename was
mm-page_alloc-add-trace-event-for-totalreserve_pages-calculation.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: Martin Liu <[email protected]>
Subject: mm/page_alloc: add trace event for totalreserve_pages calculation
Date: Sat, 8 Mar 2025 03:46:02 +0000

This commit introduces a new trace event, mm_calculate_totalreserve_pages, which reports the new reserve value at the exact time when it takes effect.

The totalreserve_pages value represents the total amount of memory reserved across all zones and nodes in the system. This reserved memory is crucial for ensuring that critical kernel operations have access to sufficient memory, even under memory pressure.

By tracing the totalreserve_pages value, developers can gain insights that how the total reserved memory changes over time.

---

 include/trace/events/kmem.h |   18 ++++++++++++++++++
 mm/page_alloc.c             |    1 +
 2 files changed, 19 insertions(+)
include/trace/events/kmem.h renamed from include/trace/events/kmem.h~mm-page_alloc-add-trace-event-for-totalreserve_pages-calculation +18 -0
@@ -402,6 +402,24 @@ TRACE_EVENT(mm_setup_per_zone_lowmem_res
 		  __entry->lowmem_reserve)
 );
 
+TRACE_EVENT(mm_calculate_totalreserve_pages,
+
+	TP_PROTO(unsigned long totalreserve_pages),
+
+	TP_ARGS(totalreserve_pages),
+
+	TP_STRUCT__entry(
+		__field(unsigned long, totalreserve_pages)
+	),
+
+	TP_fast_assign(
+		__entry->totalreserve_pages = totalreserve_pages;
+	),
+
+	TP_printk("totalreserve_pages=%lu", __entry->totalreserve_pages)
+);
+
+
 /*
  * Required for uniquely and securely identifying mm in rss_stat tracepoint.
  */
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-add-trace-event-for-totalreserve_pages-calculation +1 -0
@@ -5914,6 +5914,7 @@ static void calculate_totalreserve_pages
 		}
 	}
 	totalreserve_pages = reserve_pages;
+	trace_mm_calculate_totalreserve_pages(totalreserve_pages);
 }
 
 /*

_

Patches currently in -mm which might be from [email protected] are