Skip to content

Commit 476e858

Browse files
author
Peter Zijlstra
committed
sched, x86: Enable Lazy preemption
Add the TIF bit and select the Kconfig symbol to make it go. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 35772d6 commit 476e858

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ config X86
9393
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
9494
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
9595
select ARCH_HAS_PMEM_API if X86_64
96+
select ARCH_HAS_PREEMPT_LAZY
9697
select ARCH_HAS_PTE_DEVMAP if X86_64
9798
select ARCH_HAS_PTE_SPECIAL
9899
select ARCH_HAS_HW_PTE_YOUNG

arch/x86/include/asm/thread_info.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ struct thread_info {
8787
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
8888
#define TIF_SIGPENDING 2 /* signal pending */
8989
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
90-
#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
91-
#define TIF_SSBD 5 /* Speculative store bypass disable */
90+
#define TIF_NEED_RESCHED_LAZY 4 /* rescheduling necessary */
91+
#define TIF_SINGLESTEP 5 /* reenable singlestep on user return*/
92+
#define TIF_SSBD 6 /* Speculative store bypass disable */
9293
#define TIF_SPEC_IB 9 /* Indirect branch speculation mitigation */
9394
#define TIF_SPEC_L1D_FLUSH 10 /* Flush L1D on mm switches (processes) */
9495
#define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */
@@ -110,6 +111,7 @@ struct thread_info {
110111
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
111112
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
112113
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
114+
#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY)
113115
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
114116
#define _TIF_SSBD (1 << TIF_SSBD)
115117
#define _TIF_SPEC_IB (1 << TIF_SPEC_IB)

0 commit comments

Comments
 (0)