]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/page_alloc: add trace event for per-zone lowmem reserve setup
authorMartin Liu <liumartin@google.com>
Sat, 8 Mar 2025 03:46:01 +0000 (03:46 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Mar 2025 05:07:03 +0000 (22:07 -0700)
commita293aba4a584709889f77a0ad0c45746aecf1b9f
tree47ee6e6d8b000b13ac38a3f185a1e04ea43cfe84
parent8c02048d1c6126527f15752a5e0849dc49cefeeb
mm/page_alloc: add trace event for per-zone lowmem reserve setup

This commit introduces the `mm_setup_per_zone_lowmem_reserve` trace
event,which provides detailed insights into the kernel's per-zone lowmem
reserve configuration.

The trace event provides precise timestamps, allowing developers to

1. Correlate lowmem reserve changes with specific kernel events and
   able to diagnose unexpected kswapd or direct reclaim behavior triggered
   by dynamic changes in lowmem reserve.

2. Know memory allocation failures that occur due to insufficient
   lowmem reserve, by precisely correlating allocation attempts with
   reserve adjustments.

Link: https://lkml.kernel.org/r/20250308034606.2036033-3-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>
include/trace/events/kmem.h
mm/page_alloc.c