summaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorStefan Roesch <shr@devkernel.io>2023-12-19 00:10:53 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-12-29 20:58:27 +0100
commit5088b49730afaaf3134d42705cfcff7ce8be082e (patch)
treee974b3ab381f332a503c70ca68e0602d4f6f6853 /mm/ksm.c
parentmm/ksm: add sysfs knobs for advisor (diff)
downloadlinux-5088b49730afaaf3134d42705cfcff7ce8be082e.tar.xz
linux-5088b49730afaaf3134d42705cfcff7ce8be082e.zip
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 '')
-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)