Re: [PATCH 2/5] rseq: Move slice_ext_nsec to debugfs
From: Thomas Weißschuh
Date: Wed Jan 21 2026 - 10:44:27 EST
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@xxxxxxxxxxxxx>
> ---
(...)
> --- 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.
> +
> 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.
> + 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.
(...)