Revert "Bluetooth: Store advertising handle so it can be re-enabled"
[platform/kernel/linux-rpi.git] / kernel / Kconfig.preempt
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 config PREEMPT_NONE_BUILD
4         bool
5
6 config PREEMPT_VOLUNTARY_BUILD
7         bool
8
9 config PREEMPT_BUILD
10         bool
11         select PREEMPTION
12         select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
13
14 config PREEMPT_BUILD_AUTO
15         bool
16         select PREEMPT_BUILD
17
18 config HAVE_PREEMPT_AUTO
19         bool
20
21 choice
22         prompt "Preemption Model"
23         default PREEMPT_NONE
24
25 config PREEMPT_NONE
26         bool "No Forced Preemption (Server)"
27         select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
28         help
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
32           are possible.
33
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
37           latencies.
38
39 config PREEMPT_VOLUNTARY
40         bool "Voluntary Kernel Preemption (Desktop)"
41         depends on !ARCH_NO_PREEMPT
42         select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
43         help
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.
49
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
54           under load.
55
56           Select this if you are building a kernel for a desktop system.
57
58 config PREEMPT
59         bool "Preemptible Kernel (Low-Latency Desktop)"
60         depends on !ARCH_NO_PREEMPT
61         select PREEMPT_BUILD
62         help
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.
72
73           Select this if you are building a kernel for a desktop or
74           embedded system with latency requirements in the milliseconds
75           range.
76
77 config PREEMPT_AUTO
78         bool "Automagic preemption mode with runtime tweaking support"
79         depends on HAVE_PREEMPT_AUTO
80         select PREEMPT_BUILD_AUTO
81         help
82           Add some sensible blurb here
83
84 config PREEMPT_RT
85         bool "Fully Preemptible Kernel (Real-Time)"
86         depends on EXPERT && ARCH_SUPPORTS_RT
87         select PREEMPT_BUILD_AUTO if HAVE_PREEMPT_AUTO
88         select PREEMPTION
89         help
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.
98
99           Select this if you are building a kernel for systems which
100           require real-time guarantees.
101
102 endchoice
103
104 config PREEMPT_COUNT
105        bool
106
107 config PREEMPTION
108        bool
109        select PREEMPT_COUNT
110
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
115         select PREEMPT_BUILD
116         default y if HAVE_PREEMPT_DYNAMIC_CALL
117         help
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.
121
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.
125
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.
129
130           Interesting if you want the same pre-built kernel should be used for
131           both Server and Desktop workloads.
132
133 config SCHED_CORE
134         bool "Core Scheduling for SMT"
135         depends on SCHED_SMT
136         help
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.
142
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.
146
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.
150
151