arch_topology: Fix missing clear cluster_cpumask in remove_cpu_topology()
[linux-2.6-block.git] / kernel / Kconfig.preempt
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
cc19ca86 2
f8cbd99b
IM
3choice
4 prompt "Preemption Model"
c597bfdd 5 default PREEMPT_NONE_BEHAVIOUR
f8cbd99b 6
c597bfdd 7config PREEMPT_NONE_BEHAVIOUR
f8cbd99b 8 bool "No Forced Preemption (Server)"
c597bfdd 9 select PREEMPT_NONE if !PREEMPT_DYNAMIC
f8cbd99b
IM
10 help
11 This is the traditional Linux preemption model, geared towards
12 throughput. It will still provide good latencies most of the
13 time, but there are no guarantees and occasional longer delays
14 are possible.
15
16 Select this option if you are building a kernel for a server or
17 scientific/computation system, or if you want to maximize the
18 raw processing power of the kernel, irrespective of scheduling
19 latencies.
20
c597bfdd 21config PREEMPT_VOLUNTARY_BEHAVIOUR
f8cbd99b 22 bool "Voluntary Kernel Preemption (Desktop)"
87a4c375 23 depends on !ARCH_NO_PREEMPT
c597bfdd 24 select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC
cc19ca86 25 help
f8cbd99b
IM
26 This option reduces the latency of the kernel by adding more
27 "explicit preemption points" to the kernel code. These new
28 preemption points have been selected to reduce the maximum
29 latency of rescheduling, providing faster application reactions,
3dde6ad8 30 at the cost of slightly lower throughput.
f8cbd99b
IM
31
32 This allows reaction to interactive events by allowing a
33 low priority process to voluntarily preempt itself even if it
34 is in kernel mode executing a system call. This allows
35 applications to run more 'smoothly' even when the system is
cc19ca86
IM
36 under load.
37
f8cbd99b
IM
38 Select this if you are building a kernel for a desktop system.
39
c597bfdd 40config PREEMPT_BEHAVIOUR
f8cbd99b 41 bool "Preemptible Kernel (Low-Latency Desktop)"
87a4c375 42 depends on !ARCH_NO_PREEMPT
c597bfdd 43 select PREEMPT
f8cbd99b
IM
44 help
45 This option reduces the latency of the kernel by making
46 all kernel code (that is not executing in a critical section)
47 preemptible. This allows reaction to interactive events by
48 permitting a low priority process to be preempted involuntarily
49 even if it is in kernel mode executing a system call and would
50 otherwise not be about to reach a natural preemption point.
51 This allows applications to run more 'smoothly' even when the
3dde6ad8 52 system is under load, at the cost of slightly lower throughput
f8cbd99b
IM
53 and a slight runtime overhead to kernel code.
54
55 Select this if you are building a kernel for a desktop or
56 embedded system with latency requirements in the milliseconds
57 range.
58
a50a3f4b
TG
59config PREEMPT_RT
60 bool "Fully Preemptible Kernel (Real-Time)"
c597bfdd 61 depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC
b8d33498 62 select PREEMPTION
a50a3f4b
TG
63 help
64 This option turns the kernel into a real-time kernel by replacing
65 various locking primitives (spinlocks, rwlocks, etc.) with
66 preemptible priority-inheritance aware variants, enforcing
67 interrupt threading and introducing mechanisms to break up long
68 non-preemptible sections. This makes the kernel, except for very
d61ca3c2 69 low level and critical code paths (entry code, scheduler, low
a50a3f4b
TG
70 level interrupt handling) fully preemptible and brings most
71 execution contexts under scheduler control.
72
73 Select this if you are building a kernel for systems which
74 require real-time guarantees.
75
f8cbd99b 76endchoice
cc19ca86 77
c597bfdd
FW
78config PREEMPT_NONE
79 bool
80
81config PREEMPT_VOLUNTARY
82 bool
83
84config PREEMPT
85 bool
86 select PREEMPTION
87 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
88
bdd4e85d 89config PREEMPT_COUNT
72367933 90 bool
a50a3f4b 91
b8d33498 92config PREEMPTION
a50a3f4b
TG
93 bool
94 select PREEMPT_COUNT
6ef869e0
MH
95
96config PREEMPT_DYNAMIC
c597bfdd
FW
97 bool "Preemption behaviour defined on boot"
98 depends on HAVE_PREEMPT_DYNAMIC
99 select PREEMPT
100 default y
6ef869e0
MH
101 help
102 This option allows to define the preemption model on the kernel
103 command line parameter and thus override the default preemption
104 model defined during compile time.
105
106 The feature is primarily interesting for Linux distributions which
107 provide a pre-built kernel binary to reduce the number of kernel
108 flavors they offer while still offering different usecases.
109
110 The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled
111 but if runtime patching is not available for the specific architecture
112 then the potential overhead should be considered.
113
114 Interesting if you want the same pre-built kernel should be used for
115 both Server and Desktop workloads.
9edeaea1
PZ
116
117config SCHED_CORE
118 bool "Core Scheduling for SMT"
9edeaea1 119 depends on SCHED_SMT
7b419f47
PZ
120 help
121 This option permits Core Scheduling, a means of coordinated task
122 selection across SMT siblings. When enabled -- see
123 prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings
124 will execute a task from the same 'core group', forcing idle when no
125 matching task is found.
126
127 Use of this feature includes:
128 - mitigation of some (not all) SMT side channels;
129 - limiting SMT interference to improve determinism and/or performance.
130
d2343cb8
IM
131 SCHED_CORE is default disabled. When it is enabled and unused,
132 which is the likely usage by Linux distributions, there should
133 be no measurable impact on performance.
7b419f47 134
9edeaea1 135