1 # SPDX-License-Identifier: GPL-2.0-only
3 config PREEMPT_NONE_BUILD
6 config PREEMPT_VOLUNTARY_BUILD
12 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
14 config PREEMPT_BUILD_AUTO
18 config HAVE_PREEMPT_AUTO
22 prompt "Preemption Model"
26 bool "No Forced Preemption (Server)"
27 select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
29 This is the traditional Linux preemption model, geared towards
30 throughput. It will still provide good latencies most of the
31 time, but there are no guarantees and occasional longer delays
34 Select this option if you are building a kernel for a server or
35 scientific/computation system, or if you want to maximize the
36 raw processing power of the kernel, irrespective of scheduling
39 config PREEMPT_VOLUNTARY
40 bool "Voluntary Kernel Preemption (Desktop)"
41 depends on !ARCH_NO_PREEMPT
42 select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
44 This option reduces the latency of the kernel by adding more
45 "explicit preemption points" to the kernel code. These new
46 preemption points have been selected to reduce the maximum
47 latency of rescheduling, providing faster application reactions,
48 at the cost of slightly lower throughput.
50 This allows reaction to interactive events by allowing a
51 low priority process to voluntarily preempt itself even if it
52 is in kernel mode executing a system call. This allows
53 applications to run more 'smoothly' even when the system is
56 Select this if you are building a kernel for a desktop system.
59 bool "Preemptible Kernel (Low-Latency Desktop)"
60 depends on !ARCH_NO_PREEMPT
63 This option reduces the latency of the kernel by making
64 all kernel code (that is not executing in a critical section)
65 preemptible. This allows reaction to interactive events by
66 permitting a low priority process to be preempted involuntarily
67 even if it is in kernel mode executing a system call and would
68 otherwise not be about to reach a natural preemption point.
69 This allows applications to run more 'smoothly' even when the
70 system is under load, at the cost of slightly lower throughput
71 and a slight runtime overhead to kernel code.
73 Select this if you are building a kernel for a desktop or
74 embedded system with latency requirements in the milliseconds
78 bool "Automagic preemption mode with runtime tweaking support"
79 depends on HAVE_PREEMPT_AUTO
80 select PREEMPT_BUILD_AUTO
82 Add some sensible blurb here
85 bool "Fully Preemptible Kernel (Real-Time)"
86 depends on EXPERT && ARCH_SUPPORTS_RT
87 select PREEMPT_BUILD_AUTO if HAVE_PREEMPT_AUTO
90 This option turns the kernel into a real-time kernel by replacing
91 various locking primitives (spinlocks, rwlocks, etc.) with
92 preemptible priority-inheritance aware variants, enforcing
93 interrupt threading and introducing mechanisms to break up long
94 non-preemptible sections. This makes the kernel, except for very
95 low level and critical code paths (entry code, scheduler, low
96 level interrupt handling) fully preemptible and brings most
97 execution contexts under scheduler control.
99 Select this if you are building a kernel for systems which
100 require real-time guarantees.
111 config PREEMPT_DYNAMIC
112 bool "Preemption behaviour defined on boot"
113 depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT && !PREEMPT_AUTO
114 select JUMP_LABEL if HAVE_PREEMPT_DYNAMIC_KEY
116 default y if HAVE_PREEMPT_DYNAMIC_CALL
118 This option allows to define the preemption model on the kernel
119 command line parameter and thus override the default preemption
120 model defined during compile time.
122 The feature is primarily interesting for Linux distributions which
123 provide a pre-built kernel binary to reduce the number of kernel
124 flavors they offer while still offering different usecases.
126 The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled
127 but if runtime patching is not available for the specific architecture
128 then the potential overhead should be considered.
130 Interesting if you want the same pre-built kernel should be used for
131 both Server and Desktop workloads.
134 bool "Core Scheduling for SMT"
137 This option permits Core Scheduling, a means of coordinated task
138 selection across SMT siblings. When enabled -- see
139 prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings
140 will execute a task from the same 'core group', forcing idle when no
141 matching task is found.
143 Use of this feature includes:
144 - mitigation of some (not all) SMT side channels;
145 - limiting SMT interference to improve determinism and/or performance.
147 SCHED_CORE is default disabled. When it is enabled and unused,
148 which is the likely usage by Linux distributions, there should
149 be no measurable impact on performance.