1 # SPDX-License-Identifier: GPL-2.0-only
4 prompt "Preemption Model"
8 bool "No Forced Preemption (Server)"
10 This is the traditional Linux preemption model, geared towards
11 throughput. It will still provide good latencies most of the
12 time, but there are no guarantees and occasional longer delays
15 Select this option if you are building a kernel for a server or
16 scientific/computation system, or if you want to maximize the
17 raw processing power of the kernel, irrespective of scheduling
20 config PREEMPT_VOLUNTARY
21 bool "Voluntary Kernel Preemption (Desktop)"
22 depends on !ARCH_NO_PREEMPT
24 This option reduces the latency of the kernel by adding more
25 "explicit preemption points" to the kernel code. These new
26 preemption points have been selected to reduce the maximum
27 latency of rescheduling, providing faster application reactions,
28 at the cost of slightly lower throughput.
30 This allows reaction to interactive events by allowing a
31 low priority process to voluntarily preempt itself even if it
32 is in kernel mode executing a system call. This allows
33 applications to run more 'smoothly' even when the system is
36 Select this if you are building a kernel for a desktop system.
39 bool "Preemptible Kernel (Low-Latency Desktop)"
40 depends on !ARCH_NO_PREEMPT
42 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
43 select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC
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
52 system is under load, at the cost of slightly lower throughput
53 and a slight runtime overhead to kernel code.
55 Select this if you are building a kernel for a desktop or
56 embedded system with latency requirements in the milliseconds
60 bool "Fully Preemptible Kernel (Real-Time)"
61 depends on EXPERT && ARCH_SUPPORTS_RT
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
69 low level and critical code paths (entry code, scheduler, low
70 level interrupt handling) fully preemptible and brings most
71 execution contexts under scheduler control.
73 Select this if you are building a kernel for systems which
74 require real-time guarantees.
85 config PREEMPT_DYNAMIC
88 This option allows to define the preemption model on the kernel
89 command line parameter and thus override the default preemption
90 model defined during compile time.
92 The feature is primarily interesting for Linux distributions which
93 provide a pre-built kernel binary to reduce the number of kernel
94 flavors they offer while still offering different usecases.
96 The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled
97 but if runtime patching is not available for the specific architecture
98 then the potential overhead should be considered.
100 Interesting if you want the same pre-built kernel should be used for
101 both Server and Desktop workloads.
104 bool "Core Scheduling for SMT"
107 This option permits Core Scheduling, a means of coordinated task
108 selection across SMT siblings. When enabled -- see
109 prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings
110 will execute a task from the same 'core group', forcing idle when no
111 matching task is found.
113 Use of this feature includes:
114 - mitigation of some (not all) SMT side channels;
115 - limiting SMT interference to improve determinism and/or performance.
117 SCHED_CORE is default disabled. When it is enabled and unused,
118 which is the likely usage by Linux distributions, there should
119 be no measurable impact on performance.