1 # SPDX-License-Identifier: GPL-2.0-only
3 config HAVE_PREEMPT_LAZY
7 def_bool y if HAVE_PREEMPT_LAZY && PREEMPT_RT
10 prompt "Preemption Model"
14 bool "No Forced Preemption (Server)"
16 This is the traditional Linux preemption model, geared towards
17 throughput. It will still provide good latencies most of the
18 time, but there are no guarantees and occasional longer delays
21 Select this option if you are building a kernel for a server or
22 scientific/computation system, or if you want to maximize the
23 raw processing power of the kernel, irrespective of scheduling
26 config PREEMPT_VOLUNTARY
27 bool "Voluntary Kernel Preemption (Desktop)"
28 depends on !ARCH_NO_PREEMPT
30 This option reduces the latency of the kernel by adding more
31 "explicit preemption points" to the kernel code. These new
32 preemption points have been selected to reduce the maximum
33 latency of rescheduling, providing faster application reactions,
34 at the cost of slightly lower throughput.
36 This allows reaction to interactive events by allowing a
37 low priority process to voluntarily preempt itself even if it
38 is in kernel mode executing a system call. This allows
39 applications to run more 'smoothly' even when the system is
42 Select this if you are building a kernel for a desktop system.
45 bool "Preemptible Kernel (Low-Latency Desktop)"
46 depends on !ARCH_NO_PREEMPT
48 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
49 select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC
51 This option reduces the latency of the kernel by making
52 all kernel code (that is not executing in a critical section)
53 preemptible. This allows reaction to interactive events by
54 permitting a low priority process to be preempted involuntarily
55 even if it is in kernel mode executing a system call and would
56 otherwise not be about to reach a natural preemption point.
57 This allows applications to run more 'smoothly' even when the
58 system is under load, at the cost of slightly lower throughput
59 and a slight runtime overhead to kernel code.
61 Select this if you are building a kernel for a desktop or
62 embedded system with latency requirements in the milliseconds
66 bool "Fully Preemptible Kernel (Real-Time)"
67 depends on EXPERT && ARCH_SUPPORTS_RT
70 This option turns the kernel into a real-time kernel by replacing
71 various locking primitives (spinlocks, rwlocks, etc.) with
72 preemptible priority-inheritance aware variants, enforcing
73 interrupt threading and introducing mechanisms to break up long
74 non-preemptible sections. This makes the kernel, except for very
75 low level and critical code paths (entry code, scheduler, low
76 level interrupt handling) fully preemptible and brings most
77 execution contexts under scheduler control.
79 Select this if you are building a kernel for systems which
80 require real-time guarantees.
91 config PREEMPT_DYNAMIC
94 This option allows to define the preemption model on the kernel
95 command line parameter and thus override the default preemption
96 model defined during compile time.
98 The feature is primarily interesting for Linux distributions which
99 provide a pre-built kernel binary to reduce the number of kernel
100 flavors they offer while still offering different usecases.
102 The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled
103 but if runtime patching is not available for the specific architecture
104 then the potential overhead should be considered.
106 Interesting if you want the same pre-built kernel should be used for
107 both Server and Desktop workloads.
110 bool "Core Scheduling for SMT"
113 This option permits Core Scheduling, a means of coordinated task
114 selection across SMT siblings. When enabled -- see
115 prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings
116 will execute a task from the same 'core group', forcing idle when no
117 matching task is found.
119 Use of this feature includes:
120 - mitigation of some (not all) SMT side channels;
121 - limiting SMT interference to improve determinism and/or performance.
123 SCHED_CORE is default disabled. When it is enabled and unused,
124 which is the likely usage by Linux distributions, there should
125 be no measurable impact on performance.