Skip to content

Commit 0ada4d2

Browse files
kerneltoastExactExampl
authored andcommitted
arm64: Inline the spin lock function family
Combined with LTO, this yields a consistent 5% boost to procfs I/O performance right off the bat (as measured with callbench). The spin lock functions constitute some of the hottest code paths in the kernel; inlining them to improve performance makes sense. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Danny Lin <danny@kdrag0n.dev>
1 parent 52c0f71 commit 0ada4d2

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

arch/arm64/Kconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,34 @@ config ARM64
176176
select SWIOTLB
177177
select SYSCTL_EXCEPTION_TRACE
178178
select THREAD_INFO_IN_TASK
179+
select ARCH_INLINE_SPIN_TRYLOCK
180+
select ARCH_INLINE_SPIN_TRYLOCK_BH
181+
select ARCH_INLINE_SPIN_LOCK
182+
select ARCH_INLINE_SPIN_LOCK_BH
183+
select ARCH_INLINE_SPIN_LOCK_IRQ
184+
select ARCH_INLINE_SPIN_LOCK_IRQSAVE
185+
select ARCH_INLINE_SPIN_UNLOCK
186+
select ARCH_INLINE_SPIN_UNLOCK_BH
187+
select ARCH_INLINE_SPIN_UNLOCK_IRQ
188+
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
189+
select ARCH_INLINE_READ_TRYLOCK
190+
select ARCH_INLINE_READ_LOCK
191+
select ARCH_INLINE_READ_LOCK_BH
192+
select ARCH_INLINE_READ_LOCK_IRQ
193+
select ARCH_INLINE_READ_LOCK_IRQSAVE
194+
select ARCH_INLINE_READ_UNLOCK
195+
select ARCH_INLINE_READ_UNLOCK_BH
196+
select ARCH_INLINE_READ_UNLOCK_IRQ
197+
select ARCH_INLINE_READ_UNLOCK_IRQRESTORE
198+
select ARCH_INLINE_WRITE_TRYLOCK
199+
select ARCH_INLINE_WRITE_LOCK
200+
select ARCH_INLINE_WRITE_LOCK_BH
201+
select ARCH_INLINE_WRITE_LOCK_IRQ
202+
select ARCH_INLINE_WRITE_LOCK_IRQSAVE
203+
select ARCH_INLINE_WRITE_UNLOCK
204+
select ARCH_INLINE_WRITE_UNLOCK_BH
205+
select ARCH_INLINE_WRITE_UNLOCK_IRQ
206+
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
179207
help
180208
ARM 64-bit (AArch64) Linux support.
181209

0 commit comments

Comments
 (0)