arm64: Select POSIX_CPU_TIMERS_TASK_WORK
PATCH 1/1 arm64: Select POSIX_CPU_TIMERS_TASK_WORK
With 6caa5812e2d1 ("KVM: arm64: Use generic KVM xfer to guest work function") all arm64 exit paths are properly equipped to handle the POSIX timers' task work.
Deferring timer callbacks to thread context, not only limits the amount of time spent in hard interrupt context, but is a safer implementation[1], and will allow PREEMPT_RT setups to use KVM[2].
So let's enable POSIX_CPU_TIMERS_TASK_WORK on arm64.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://www.spinics.net/lists/linux-rt-users/msg24860.html
---
This was tested by running all relevant kernel timer self-tests and making sure KVM still works as expected.
arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig +1 -0
@@ -191,6 +191,7 @@ config ARM64 select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX select MMU_GATHER_RCU_TABLE_FREE
Signature · 1 line
2.32.0
[adding Marc Z to Cc, since this affects KVM]
Quoted 4 lines · Nicolas Saenz Julienne
With
6caa5812e2d1("KVM: arm64: Use generic KVM xfer to guest work function") all arm64 exit paths are properly equipped to handle the POSIX timers' task work.
Quoted 8 lines
Deferring timer callbacks to thread context, not only limits the amount of time spent in hard interrupt context, but is a safer implementation[1], and will allow
PREEMPT_RTsetups to use KVM[2].So let's enable
POSIX_CPU_TIMERS_TASK_WORKon arm64.[1] https://lore.kernel.org/all/[email protected]/
[2] https://www.spinics.net/lists/linux-rt-users/msg24860.html
Trivial nit: could we please make that second link:
https://lore.kernel.org/linux-rt-users/87v92bdnlx.ffs@tglx/
Quoted 1 line
Signed-off-by Nicolas Saenz Julienne <[email protected]>
Regardless, this makes sense to me, and given you've tested it:
Thanks,
Mark.
Quoted 24 lines
---
This was tested by running all relevant kernel timer self-tests and making sure KVM still works as expected.
arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm64/Kconfig +1
-0@@ -191,6 +191,7 @@ config ARM64 select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX select MMU_GATHER_RCU_TABLE_FREESignature · 1 line
2.32.0
Marc Zyngier
Acked-byQuoted 39 lines · Mark Rutland
[adding Marc Z to Cc, since this affects KVM]
Quoted 4 lines · Nicolas Saenz Julienne
With
6caa5812e2d1("KVM: arm64: Use generic KVM xfer to guest work function") all arm64 exit paths are properly equipped to handle the POSIX timers' task work.Quoted 8 lines
Deferring timer callbacks to thread context, not only limits the amount of time spent in hard interrupt context, but is a safer implementation[1], and will allow
PREEMPT_RTsetups to use KVM[2].So let's enable
POSIX_CPU_TIMERS_TASK_WORKon arm64.[1] https://lore.kernel.org/all/[email protected]/
[2] https://www.spinics.net/lists/linux-rt-users/msg24860.htmlTrivial nit: could we please make that second link:
https://lore.kernel.org/linux-rt-users/87v92bdnlx.ffs@tglx/
Quoted 1 line
Signed-off-by Nicolas Saenz Julienne <[email protected]>Regardless, this makes sense to me, and given you've tested it:
Acked-by Mark Rutland <[email protected]>Thanks,
Mark.Quoted 9 lines
---
This was tested by running all relevant kernel timer self-tests and making sure KVM still works as expected.
arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
arch/arm64/Kconfig config ARM64 · line 197
Quoted 12 lines
arch/arm64/Kconfig +1
-0@@ -191,6 +191,7 @@ config ARM64 select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX select MMU_GATHER_RCU_TABLE_FREE
Looks reasonable to me.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Quoted 9 lines · Nicolas Saenz Julienne
With
6caa5812e2d1("KVM: arm64: Use generic KVM xfer to guest work function") all arm64 exit paths are properly equipped to handle the POSIX timers' task work.Deferring timer callbacks to thread context, not only limits the amount of time spent in hard interrupt context, but is a safer implementation[1], and will allow
PREEMPT_RTsetups to use KVM[2].[...]
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: Select POSIX_CPU_TIMERS_TASK_WORK
https://git.kernel.org/arm64/c/a68773bd32d9
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev