rseq: always inline rseq_debug_syscall_return()
PATCH 1/1 rseq: always inline rseq_debug_syscall_return()
To get full benefit of commit eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y"), clang needs __always_inline instead of inline qualifier.
Tested:
for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | grep "ops/sec"; done
Before:
15,490,350 ops/sec
15,564,199 ops/sec
15,450,324 ops/sec
15,443,986 ops/sec
15,519,631 ops/sec
15,400,475 ops/sec
15,282,792 ops/sec
15,464,758 ops/sec
15,344,973 ops/sec
15,283,429 ops/secAfter:
15,940,189 ops/sec
15,971,037 ops/sec
15,963,332 ops/sec
15,897,626 ops/sec
15,824,637 ops/sec
15,719,760 ops/sec
15,823,175 ops/sec
15,745,080 ops/sec
15,930,646 ops/sec
15,906,730 ops/sec--- include/linux/rseq_entry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rseq_entry.h +1 -1
@@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_legacy(void)void __rseq_debug_syscall_return (struct pt_regs *regs); -static inline void rseq_debug_syscall_return (struct pt_regs *regs) +static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs) {if (static_branch_unlikely (&rseq_debug_enabled))__rseq_debug_syscall_return (regs);
Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
Quoted 5 lines · Eric Dumazet
To get full benefit of commit
eaa9088d568c("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y"), clang needs__always_inlineinstead of inline qualifier.
...Signed-off-by Eric Dumazet <[email protected]>
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com
[tip: core/urgent] rseq: Always inline rseq_debug_syscall_return()
In reply to Eric DumazetThe following commit has been merged into the core/urgent branch of tip:
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: ad9c647ad7627d1ced814fca6d75d046b5a04d6b Gitweb: https://git.kernel.org/tip/ad9c647ad7627d1ced814fca6d75d046b5a04d6b Author: Eric Dumazet <[email protected]> AuthorDate: Fri, 05 Dec 2025 10:07:53 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 10 Dec 2025 10:10:05 +09:00
rseq: Always inline rseq_debug_syscall_return()
To get the full benefit of commit eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y"), clang needs __always_inline instead of a plain inline qualifier.
for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | grep "ops/sec"; done
Before After
ops/sec 15424491 15872221 +2.9%
--- include/linux/rseq_entry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rseq_entry.h +1 -1
@@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_legacy(void)void __rseq_debug_syscall_return (struct pt_regs *regs); -static inline void rseq_debug_syscall_return (struct pt_regs *regs) +static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs) {if (static_branch_unlikely (&rseq_debug_enabled))__rseq_debug_syscall_return (regs);
[tip: core/urgent] rseq: Always inline rseq_debug_syscall_return()
In reply to Eric DumazetThe following commit has been merged into the core/urgent branch of tip:
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: f1de49094b9e0b44f85a0f8b77bc27d8ca222e3c Gitweb: https://git.kernel.org/tip/f1de49094b9e0b44f85a0f8b77bc27d8ca222e3c Author: Eric Dumazet <[email protected]> AuthorDate: Fri, 05 Dec 2025 10:07:53 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 12 Dec 2025 10:07:06 +01:00
rseq: Always inline rseq_debug_syscall_return()
To get the full benefit of:
eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y")
clang needs an __always_inline instead of a plain inline qualifier:
$ for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | grep "ops/sec"; doneBefore After ops/sec 15424491 15872221 +2.9%
--- include/linux/rseq_entry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rseq_entry.h +1 -1
@@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_legacy(void)void __rseq_debug_syscall_return (struct pt_regs *regs); -static inline void rseq_debug_syscall_return (struct pt_regs *regs) +static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs) {if (static_branch_unlikely (&rseq_debug_enabled))__rseq_debug_syscall_return (regs);
[tip: core/urgent] rseq: Always inline rseq_debug_syscall_return()
In reply to Eric DumazetThe following commit has been merged into the core/urgent branch of tip:
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: bdae29d6512ddc589200b9ae6bda467bdbab863d Gitweb: https://git.kernel.org/tip/bdae29d6512ddc589200b9ae6bda467bdbab863d Author: Eric Dumazet <[email protected]> AuthorDate: Fri, 05 Dec 2025 10:07:53 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 12 Dec 2025 10:26:26 +01:00
rseq: Always inline rseq_debug_syscall_return()
To get the full benefit of:
eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y")
clang needs an __always_inline instead of a plain inline qualifier:
$ for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | grep "ops/sec"; doneBefore After ops/sec 15424491 15872221 +2.9%
--- include/linux/rseq_entry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rseq_entry.h +1 -1
@@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_legacy(void)void __rseq_debug_syscall_return (struct pt_regs *regs); -static inline void rseq_debug_syscall_return (struct pt_regs *regs) +static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs) {if (static_branch_unlikely (&rseq_debug_enabled))__rseq_debug_syscall_return (regs);