summaryrefslogtreecommitdiff
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorStefan Roesch <shr@devkernel.io>2023-12-18 15:10:53 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-12-29 11:58:27 -0800
commit5088b49730afaaf3134d42705cfcff7ce8be082e (patch)
treee974b3ab381f332a503c70ca68e0602d4f6f6853 /mm/ksm.c
parent66790e9a735b5c42349c48881e496b6946a55c05 (diff)
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 <shr@devkernel.io> Acked-by: David Hildenbrand <david@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@surriel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r--mm/ksm.c1
1 files changed, 1 insertions, 0 deletions
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)