blob: deff972174967c55eab3cdaeec5b1e10903e290a [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Ingo Molnarcc19ca82005-06-25 14:57:36 -07002
Ingo Molnarf8cbd992005-06-25 14:57:39 -07003choice
4 prompt "Preemption Model"
5 default PREEMPT_NONE
6
7config PREEMPT_NONE
8 bool "No Forced Preemption (Server)"
Ingo Molnarcc19ca82005-06-25 14:57:36 -07009 help
Ingo Molnarf8cbd992005-06-25 14:57:39 -070010 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
13 are possible.
14
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
18 latencies.
19
20config PREEMPT_VOLUNTARY
21 bool "Voluntary Kernel Preemption (Desktop)"
Christoph Hellwig87a4c372018-07-31 13:39:32 +020022 depends on !ARCH_NO_PREEMPT
Ingo Molnarf8cbd992005-06-25 14:57:39 -070023 help
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,
David Sterba3dde6ad2007-05-09 07:12:20 +020028 at the cost of slightly lower throughput.
Ingo Molnarf8cbd992005-06-25 14:57:39 -070029
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
Ingo Molnarcc19ca82005-06-25 14:57:36 -070034 under load.
35
Ingo Molnarf8cbd992005-06-25 14:57:39 -070036 Select this if you are building a kernel for a desktop system.
37
Thomas Gleixnerb8d33492019-07-22 17:59:19 +020038config PREEMPT
Ingo Molnarf8cbd992005-06-25 14:57:39 -070039 bool "Preemptible Kernel (Low-Latency Desktop)"
Christoph Hellwig87a4c372018-07-31 13:39:32 +020040 depends on !ARCH_NO_PREEMPT
Thomas Gleixnerb8d33492019-07-22 17:59:19 +020041 select PREEMPTION
Raghavendra K Te335e3e2012-03-22 15:25:08 +053042 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
Ingo Molnarf8cbd992005-06-25 14:57:39 -070043 help
44 This option reduces the latency of the kernel by making
45 all kernel code (that is not executing in a critical section)
46 preemptible. This allows reaction to interactive events by
47 permitting a low priority process to be preempted involuntarily
48 even if it is in kernel mode executing a system call and would
49 otherwise not be about to reach a natural preemption point.
50 This allows applications to run more 'smoothly' even when the
David Sterba3dde6ad2007-05-09 07:12:20 +020051 system is under load, at the cost of slightly lower throughput
Ingo Molnarf8cbd992005-06-25 14:57:39 -070052 and a slight runtime overhead to kernel code.
53
54 Select this if you are building a kernel for a desktop or
55 embedded system with latency requirements in the milliseconds
56 range.
57
Thomas Gleixnera50a3f42019-07-17 22:01:49 +020058config PREEMPT_RT
59 bool "Fully Preemptible Kernel (Real-Time)"
60 depends on EXPERT && ARCH_SUPPORTS_RT
Thomas Gleixnerb8d33492019-07-22 17:59:19 +020061 select PREEMPTION
Thomas Gleixnera50a3f42019-07-17 22:01:49 +020062 help
63 This option turns the kernel into a real-time kernel by replacing
64 various locking primitives (spinlocks, rwlocks, etc.) with
65 preemptible priority-inheritance aware variants, enforcing
66 interrupt threading and introducing mechanisms to break up long
67 non-preemptible sections. This makes the kernel, except for very
68 low level and critical code pathes (entry code, scheduler, low
69 level interrupt handling) fully preemptible and brings most
70 execution contexts under scheduler control.
71
72 Select this if you are building a kernel for systems which
73 require real-time guarantees.
74
Ingo Molnarf8cbd992005-06-25 14:57:39 -070075endchoice
Ingo Molnarcc19ca82005-06-25 14:57:36 -070076
Frederic Weisbeckerbdd4e852011-06-08 01:13:27 +020077config PREEMPT_COUNT
Masahiro Yamada72367932018-12-11 20:00:51 +090078 bool
Thomas Gleixnera50a3f42019-07-17 22:01:49 +020079
Thomas Gleixnerb8d33492019-07-22 17:59:19 +020080config PREEMPTION
Thomas Gleixnera50a3f42019-07-17 22:01:49 +020081 bool
82 select PREEMPT_COUNT