[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176501150216.498.3550395153051808220.tip-bot2@tip-bot2>
Date: Sat, 06 Dec 2025 08:58:22 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: locking/urgent] seqlock: Cure some more scoped_seqlock()
optimization fails
The following commit has been merged into the locking/urgent branch of tip:
Commit-ID: 90dfeef1cd38dff19f8b3a752d13bfd79f0f7694
Gitweb: https://git.kernel.org/tip/90dfeef1cd38dff19f8b3a752d13bfd79f0f7694
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Thu, 04 Dec 2025 11:43:32 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Sat, 06 Dec 2025 09:53:05 +01:00
seqlock: Cure some more scoped_seqlock() optimization fails
Arnd reported an x86 randconfig using gcc-15 tripped over
__scoped_seqlock_bug(). Turns out GCC chose not to inline the
scoped_seqlock helper functions and as such was not able to optimize
properly.
[ mingo: Clang fails the build too in some circumstances. ]
Reported-by: Arnd Bergmann <arnd@...db.de>
Tested-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Link: https://patch.msgid.link/20251204104332.GG2528459@noisy.programming.kicks-ass.net
---
include/linux/seqlock.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index a8a8661..2211236 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -1224,7 +1224,7 @@ struct ss_tmp {
spinlock_t *lock_irqsave;
};
-static inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
+static __always_inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
{
if (sst->lock)
spin_unlock(sst->lock);
@@ -1252,7 +1252,7 @@ static inline void __scoped_seqlock_bug(void) { }
extern void __scoped_seqlock_bug(void);
#endif
-static inline void
+static __always_inline void
__scoped_seqlock_next(struct ss_tmp *sst, seqlock_t *lock, enum ss_state target)
{
switch (sst->state) {
Powered by blists - more mailing lists