mm/page_owner: add warning when stack depth exceeds PAGE_OWNER_STACK_DEPTH
Subsystems (2)
PATCH 1/1 mm/page_owner: add warning when stack depth exceeds PAGE_OWNER_STACK_DEPTH
mm/page_owner: warn when stack trace depth hits PAGE_OWNER_STACK_DEPTH limit
Signed-off-by Jiayuan Liang <[email protected]>
--- mm/page_owner.c | 3 +++ 1 file changed, 3 insertions(+)
mm/page_owner.c +3 -0
@@ -163,6 +163,9 @@ static noinline depot_stack_handle_t save_stack(gfp_t flags)set_current_in_page_owner (); nr_entries =stack_trace_save (entries,ARRAY_SIZE (entries),2 ); +if (nr_entries >=PAGE_OWNER_STACK_DEPTH ) +pr_warn_ratelimited ("page_owner: stack depth %u exceeds limit %u, trace truncated\n" , + nr_entries,PAGE_OWNER_STACK_DEPTH ); handle =stack_depot_save (entries, nr_entries, flags);if (!handle) handle = failure_handle;
Signature · 1 line
2.43.0