patch-5.10.100-rt62.patch
[platform/kernel/linux-rpi.git] / kernel / Kconfig.preempt
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 config HAVE_PREEMPT_LAZY
4         bool
5
6 config PREEMPT_LAZY
7         def_bool y if HAVE_PREEMPT_LAZY && PREEMPT_RT
8
9 choice
10         prompt "Preemption Model"
11         default PREEMPT_NONE
12
13 config PREEMPT_NONE
14         bool "No Forced Preemption (Server)"
15         help
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
19           are possible.
20
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
24           latencies.
25
26 config PREEMPT_VOLUNTARY
27         bool "Voluntary Kernel Preemption (Desktop)"
28         depends on !ARCH_NO_PREEMPT
29         help
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.
35
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
40           under load.
41
42           Select this if you are building a kernel for a desktop system.
43
44 config PREEMPT
45         bool "Preemptible Kernel (Low-Latency Desktop)"
46         depends on !ARCH_NO_PREEMPT
47         select PREEMPTION
48         select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
49         help
50           This option reduces the latency of the kernel by making
51           all kernel code (that is not executing in a critical section)
52           preemptible.  This allows reaction to interactive events by
53           permitting a low priority process to be preempted involuntarily
54           even if it is in kernel mode executing a system call and would
55           otherwise not be about to reach a natural preemption point.
56           This allows applications to run more 'smoothly' even when the
57           system is under load, at the cost of slightly lower throughput
58           and a slight runtime overhead to kernel code.
59
60           Select this if you are building a kernel for a desktop or
61           embedded system with latency requirements in the milliseconds
62           range.
63
64 config PREEMPT_RT
65         bool "Fully Preemptible Kernel (Real-Time)"
66         depends on EXPERT && ARCH_SUPPORTS_RT
67         select PREEMPTION
68         select RT_MUTEXES
69         help
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.
78
79           Select this if you are building a kernel for systems which
80           require real-time guarantees.
81
82 endchoice
83
84 config PREEMPT_COUNT
85        bool
86
87 config PREEMPTION
88        bool
89        select PREEMPT_COUNT