diff options
author | Martin Liu <liumartin@google.com> | 2025-03-08 03:46:02 +0000 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-03-17 22:07:03 -0700 |
commit | 15766485e4a51bec2dcce304c089a95550720033 (patch) | |
tree | d91bb9edacaadaa7a2343548ccf411af5505af7e /mm | |
parent | a293aba4a584709889f77a0ad0c45746aecf1b9f (diff) |
mm/page_alloc: add trace event for totalreserve_pages calculation
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.
Link: https://lkml.kernel.org/r/20250308034606.2036033-4-liumartin@google.com
Signed-off-by: Martin Liu <liumartin@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a82d96cb3044..0be1fedd1201 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5914,6 +5914,7 @@ static void calculate_totalreserve_pages(void) } } totalreserve_pages = reserve_pages; + trace_mm_calculate_totalreserve_pages(totalreserve_pages); } /* |