lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250814070719.865-1-xuewen.yan@unisoc.com>
Date: Thu, 14 Aug 2025 15:07:19 +0800
From: Xuewen Yan <xuewen.yan@...soc.com>
To: <rostedt@...dmis.org>, <surenb@...gle.com>, <hannes@...xchg.org>,
        <peterz@...radead.org>, <mingo@...hat.com>
CC: <mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>,
        <juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
        <dietmar.eggemann@....com>, <bsegall@...gle.com>, <andrii@...nel.org>,
        <vschneid@...hat.com>, <linux-kernel@...r.kernel.org>,
        <linux-trace-kernel@...r.kernel.org>, <yuming.han@...soc.com>,
        <ke.wang@...soc.com>, <xuewen.yan94@...il.com>
Subject: [RFC PATCH] sched: psi: Add psi events trace point

Add trace point to psi triggers. This is useful to
observe the psi events in the kernel space.

Signed-off-by: Xuewen Yan <xuewen.yan@...soc.com>
---
 include/trace/events/sched.h | 5 +++++
 kernel/sched/psi.c           | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 7b2645b50e78..c23cb2bc76fd 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -896,6 +896,11 @@ DECLARE_TRACE(sched_set_need_resched,
 	TP_PROTO(struct task_struct *tsk, int cpu, int tif),
 	TP_ARGS(tsk, cpu, tif));
 
+struct psi_trigger *t
+DECLARE_TRACE(psi_event,
+	TP_PROTO(struct psi_trigger *t),
+	TP_ARGS(t));
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 59fdb7ebbf22..268fc1b9cf1d 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -509,6 +509,8 @@ static void update_triggers(struct psi_group *group, u64 now,
 		if (now < t->last_event_time + t->win.size)
 			continue;
 
+		trace_psi_event_tp(t);
+
 		/* Generate an event */
 		if (cmpxchg(&t->event, 0, 1) == 0) {
 			if (t->of)
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ