[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121145616.GD166857@noisy.programming.kicks-ass.net>
Date: Wed, 21 Jan 2026 15:56:16 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: tglx@...utronix.de, mathieu.desnoyers@...icios.com,
linux-kernel@...r.kernel.org, paulmck@...nel.org,
boqun.feng@...il.com, corbet@....net, prakash.sangappa@...cle.com,
vineethr@...ux.ibm.com, kprateek.nayak@....com, rostedt@...dmis.org,
bigeasy@...utronix.de, arnd@...db.de, rdunlap@...radead.org,
rongevarg@...il.com, longman@...hat.com
Subject: Re: [PATCH 2/5] rseq: Move slice_ext_nsec to debugfs
On Wed, Jan 21, 2026 at 03:50:55PM +0100, Thomas Weißschuh wrote:
> On Wed, Jan 21, 2026 at 03:24:59PM +0100, Peter Zijlstra wrote:
> > Move changing the slice ext duration to debugfs, a sliglty less permanent
> > interface.
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
>
> (...)
>
> > --- a/kernel/rseq.c
> > +++ b/kernel/rseq.c
> > @@ -222,12 +222,16 @@ static const struct file_operations debu
> > .release = single_release,
> > };
> >
> > +extern void rseq_slice_ext_init(struct dentry *root_dir);
>
> This is actually a static function.
Yes, but it is not always defined.
> > +
> > static int __init rseq_debugfs_init(void)
> > {
> > struct dentry *root_dir = debugfs_create_dir("rseq", NULL);
> >
> > debugfs_create_file("debug", 0644, root_dir, NULL, &debug_ops);
> > rseq_stats_init(root_dir);
> > + if (IS_ENABLED(CONFIG_RSEQ_SLICE_EXTENSIO))
>
> Missing 'N' at the end.
Argh. Some day my editor will tell me this :/
> > + rseq_slice_ext_init(root_dir);
> > return 0;
> > }
> > __initcall(rseq_debugfs_init);
> > @@ -515,7 +519,9 @@ struct slice_timer {
> > void *cookie;
> > };
>
> (...)
>
> > +#ifdef CONFIG_DEBUG_FS
>
> (...)
>
> > +#else
> > +static void rseq_slice_ext_init(struct dentry *root_dir) { }
> > +#endif
>
> It might be possible to just remove the CONFIG_DEBUG_FS ifdeffery and let the
> compiler optimize away all of the debugfs-related code automatically.
I'll check.
Powered by blists - more mailing lists