[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <725bf4f7-f671-4050-bc28-b629631682b7@efficios.com>
Date: Thu, 11 Sep 2025 11:43:29 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Peter Zilstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Jonathan Corbet <corbet@....net>,
Prakash Sangappa <prakash.sangappa@...cle.com>,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Arnd Bergmann <arnd@...db.de>, linux-arch@...r.kernel.org
Subject: Re: [patch 04/12] rseq: Add statistics for time slice extensions
On 2025-09-08 18:59, Thomas Gleixner wrote:
> Extend the quick statistics with time slice specific fields.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> ---
> include/linux/rseq_entry.h | 4 ++++
> kernel/rseq.c | 12 ++++++++++++
> 2 files changed, 16 insertions(+)
>
> --- a/include/linux/rseq_entry.h
> +++ b/include/linux/rseq_entry.h
> @@ -15,6 +15,10 @@ struct rseq_stats {
> unsigned long cs;
> unsigned long clear;
> unsigned long fixup;
> + unsigned long s_granted;
> + unsigned long s_expired;
> + unsigned long s_revoked;
> + unsigned long s_yielded;
> };
>
> DECLARE_PER_CPU(struct rseq_stats, rseq_stats);
> --- a/kernel/rseq.c
> +++ b/kernel/rseq.c
> @@ -138,6 +138,12 @@ static int rseq_stats_show(struct seq_fi
> stats.cs += data_race(per_cpu(rseq_stats.cs, cpu));
> stats.clear += data_race(per_cpu(rseq_stats.clear, cpu));
> stats.fixup += data_race(per_cpu(rseq_stats.fixup, cpu));
> + if (IS_ENABLED(CONFIG_RSEQ_SLICE_EXTENSION)) {
> + stats.s_granted += data_race(per_cpu(rseq_stats.s_granted, cpu));
> + stats.s_expired += data_race(per_cpu(rseq_stats.s_expired, cpu));
> + stats.s_revoked += data_race(per_cpu(rseq_stats.s_revoked, cpu));
> + stats.s_yielded += data_race(per_cpu(rseq_stats.s_yielded, cpu));
> + }
> }
>
> seq_printf(m, "exit: %16lu\n", stats.exit);
> @@ -148,6 +154,12 @@ static int rseq_stats_show(struct seq_fi
> seq_printf(m, "cs: %16lu\n", stats.cs);
> seq_printf(m, "clear: %16lu\n", stats.clear);
> seq_printf(m, "fixup: %16lu\n", stats.fixup);
> + if (IS_ENABLED(CONFIG_RSEQ_SLICE_EXTENSION)) {
> + seq_printf(m, "sgrant: %16lu\n", stats.s_granted);
> + seq_printf(m, "sexpir: %16lu\n", stats.s_expired);
> + seq_printf(m, "srevok: %16lu\n", stats.s_revoked);
> + seq_printf(m, "syield: %16lu\n", stats.s_yielded);
> + }
> return 0;
> }
>
>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists