From 5088b49730afaaf3134d42705cfcff7ce8be082e Mon Sep 17 00:00:00 2001 From: Stefan Roesch Date: Mon, 18 Dec 2023 15:10:53 -0800 Subject: mm/ksm: add tracepoint for ksm advisor This adds a new tracepoint for the ksm advisor. It reports the last scan time, the new setting of the pages_to_scan parameter and the average cpu percent usage of the ksmd background thread for the last scan. Link: https://lkml.kernel.org/r/20231218231054.1625219-4-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Rik van Riel Signed-off-by: Andrew Morton --- mm/ksm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mm/ksm.c') diff --git a/mm/ksm.c b/mm/ksm.c index ce3001745562..8fa6053a225d 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -458,6 +458,7 @@ static void scan_time_advisor(void) advisor_ctx.cpu_time = cpu_time; ksm_thread_pages_to_scan = pages; + trace_ksm_advisor(scan_time, pages, cpu_percent); } static void advisor_stop_scan(void) -- cgit v1.2.3