[PATCH v2 0/2] arm64: Only call into preempt_schedule() if need_resched()

From: Will Deacon
Date: Fri Nov 30 2018 - 12:34:16 EST


Hi all,

This is version two of the patches I originally posted here:

http://lkml.kernel.org/r/1543347902-21170-1-git-send-email-will.deacon@xxxxxxx

The only change since v1 is that __preempt_count_dec_and_test() now
reloads the need_resched flag if it initially saw that it was set. This
resolves the issue spotted by Peter, where an IRQ coming in during the
decrement can cause a reschedule to be missed.

Feedback welcome.

Will

--->8

Will Deacon (2):
preempt: Move PREEMPT_NEED_RESCHED definition into arch code
arm64: preempt: Provide our own implementation of asm/preempt.h

arch/arm64/include/asm/Kbuild | 1 -
arch/arm64/include/asm/preempt.h | 88 ++++++++++++++++++++++++++++++++++++
arch/arm64/include/asm/thread_info.h | 13 +++++-
arch/s390/include/asm/preempt.h | 2 +
arch/x86/include/asm/preempt.h | 3 ++
include/linux/preempt.h | 3 --
6 files changed, 105 insertions(+), 5 deletions(-)
create mode 100644 arch/arm64/include/asm/preempt.h

--
2.1.4