From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2EC9337BA6 for ; Wed, 21 Jan 2026 15:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769008519; cv=none; b=X755hmzz+rOFSy9KCh0jgLZ9d8ZnFLA5pRswmNCWd3UIBdeodWSUnOAJjT+Uex4seQdnfXsDzf7bKsR+t1E1OEbVRIGlt6ZyThGscRP75ZBA1r5TENsB4sXF+uJL5HZ24MfVT24iyzIoHMRjmAu7X+fgVvS0+awk+gXxIw5S5pg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769008519; c=relaxed/simple; bh=qBHpQ4/qGJc8m3lluSIJLU8ZTlCA/mLtjIYvZ9GIKKQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rJcc5YyXD20n9Dzljs7hAlxGHuHj1E8RQ6RT8Jj8qqXdb44XZfxA+aKuqsMbYbTJX7aZaHYZiwrTzpSEfvgoaZ95bYB1YcR2v5UMikBDfaHwM8FK+RA5Efgq+bVXGwz5GPi2qGkibaHa955wTBliznD8DWxAW3UW0vz4qCxvoyo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=YzzHpRtT; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YzzHpRtT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=bJCNEuYOcv+SFyhA53oG3TaFWI8j8qFggyz/EpvY+b0=; b=YzzHpRtTDrHwc5CR9EUajv8Eyo +iLLg9xmuCZyHlw7JdXmRFOJu2yOgzjO6EM1zgIKPlSJ6C4XK29yBQ9cegOXTo079eOyRoYzv2AaG KxrK23+o95t12bn3rtXQLUiRjr+pKOtBtu77Rwp00/CU2+Epz3ocyKgcxFjNQFPvxEBBsZED8hRru 3ZiXcXIQv94T3We/jGftvXBT3ty/cz1ZKBxvu4y2oj/WW1nkaPlxw4RWGSrTzy3G45Y0Es7EpcVWy hQdO5+d1jyYOw2ep76I0r8RitXNcklgMt+q4EU85IUEQxJGrV6LAIlTiDzVOknB3aXnBfUCqkEZvO 17LqaoXg==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1viZvB-0000000GHSD-1tHL; Wed, 21 Jan 2026 15:15:01 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 68D38300329; Wed, 21 Jan 2026 16:15:00 +0100 (CET) Date: Wed, 21 Jan 2026 16:15:00 +0100 From: Peter Zijlstra To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: tglx@linutronix.de, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, paulmck@kernel.org, boqun.feng@gmail.com, corbet@lwn.net, prakash.sangappa@oracle.com, vineethr@linux.ibm.com, kprateek.nayak@amd.com, rostedt@goodmis.org, bigeasy@linutronix.de, arnd@arndb.de, rdunlap@infradead.org, rongevarg@gmail.com, longman@redhat.com Subject: Re: [PATCH 2/5] rseq: Move slice_ext_nsec to debugfs Message-ID: <20260121151500.GE166857@noisy.programming.kicks-ass.net> References: <20260121142457.242071831@infradead.org> <20260121143207.923520192@infradead.org> <20260121154225-d38a4029-6ad9-4a83-926e-c83b6af49ac6@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260121154225-d38a4029-6ad9-4a83-926e-c83b6af49ac6@linutronix.de> On Wed, Jan 21, 2026 at 03:50:55PM +0100, Thomas Weißschuh wrote: > > +#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. Something like the below seems to actually build for SLICE_EXT=y, DEBUG_FS=n (got there through allnoconfig) Final image doesn't seem to have the various _ops,_show etc symbols either. --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -123,7 +123,6 @@ void __rseq_trace_ip_fixup(unsigned long } #endif /* CONFIG_TRACEPOINTS */ -#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_RSEQ_STATS DEFINE_PER_CPU(struct rseq_stats, rseq_stats); @@ -222,7 +221,7 @@ static const struct file_operations debu .release = single_release, }; -extern void rseq_slice_ext_init(struct dentry *root_dir); +static void rseq_slice_ext_init(struct dentry *root_dir); static int __init rseq_debugfs_init(void) { @@ -235,7 +234,6 @@ static int __init rseq_debugfs_init(void return 0; } __initcall(rseq_debugfs_init); -#endif /* CONFIG_DEBUG_FS */ static bool rseq_set_ids(struct task_struct *t, struct rseq_ids *ids, u32 node_id) { @@ -767,7 +765,6 @@ SYSCALL_DEFINE0(rseq_slice_yield) return yielded; } -#ifdef CONFIG_DEBUG_FS static int rseq_slice_ext_show(struct seq_file *m, void *p) { seq_printf(m, "%d\n", rseq_slice_ext_nsecs); @@ -810,9 +807,6 @@ static void rseq_slice_ext_init(struct d { debugfs_create_file("slice_ext_nsec", 0644, root_dir, NULL, &slice_ext_ops); } -#else -static void rseq_slice_ext_init(struct dentry *root_dir) { } -#endif static int __init rseq_slice_cmdline(char *str) { @@ -838,4 +832,6 @@ static int __init rseq_slice_init(void) return 0; } device_initcall(rseq_slice_init); +#else +static void rseq_slice_ext_init(struct dentry *root_dir) { } #endif /* CONFIG_RSEQ_SLICE_EXTENSION */