xref: /linux-6.15/kernel/Kconfig.preempt (revision e335e3eb)
1cc19ca86SIngo Molnar
2f8cbd99bSIngo Molnarchoice
3f8cbd99bSIngo Molnar	prompt "Preemption Model"
4f8cbd99bSIngo Molnar	default PREEMPT_NONE
5f8cbd99bSIngo Molnar
6f8cbd99bSIngo Molnarconfig PREEMPT_NONE
7f8cbd99bSIngo Molnar	bool "No Forced Preemption (Server)"
8cc19ca86SIngo Molnar	help
9f8cbd99bSIngo Molnar	  This is the traditional Linux preemption model, geared towards
10f8cbd99bSIngo Molnar	  throughput. It will still provide good latencies most of the
11f8cbd99bSIngo Molnar	  time, but there are no guarantees and occasional longer delays
12f8cbd99bSIngo Molnar	  are possible.
13f8cbd99bSIngo Molnar
14f8cbd99bSIngo Molnar	  Select this option if you are building a kernel for a server or
15f8cbd99bSIngo Molnar	  scientific/computation system, or if you want to maximize the
16f8cbd99bSIngo Molnar	  raw processing power of the kernel, irrespective of scheduling
17f8cbd99bSIngo Molnar	  latencies.
18f8cbd99bSIngo Molnar
19f8cbd99bSIngo Molnarconfig PREEMPT_VOLUNTARY
20f8cbd99bSIngo Molnar	bool "Voluntary Kernel Preemption (Desktop)"
21f8cbd99bSIngo Molnar	help
22f8cbd99bSIngo Molnar	  This option reduces the latency of the kernel by adding more
23f8cbd99bSIngo Molnar	  "explicit preemption points" to the kernel code. These new
24f8cbd99bSIngo Molnar	  preemption points have been selected to reduce the maximum
25f8cbd99bSIngo Molnar	  latency of rescheduling, providing faster application reactions,
263dde6ad8SDavid Sterba	  at the cost of slightly lower throughput.
27f8cbd99bSIngo Molnar
28f8cbd99bSIngo Molnar	  This allows reaction to interactive events by allowing a
29f8cbd99bSIngo Molnar	  low priority process to voluntarily preempt itself even if it
30f8cbd99bSIngo Molnar	  is in kernel mode executing a system call. This allows
31f8cbd99bSIngo Molnar	  applications to run more 'smoothly' even when the system is
32cc19ca86SIngo Molnar	  under load.
33cc19ca86SIngo Molnar
34f8cbd99bSIngo Molnar	  Select this if you are building a kernel for a desktop system.
35f8cbd99bSIngo Molnar
36f8cbd99bSIngo Molnarconfig PREEMPT
37f8cbd99bSIngo Molnar	bool "Preemptible Kernel (Low-Latency Desktop)"
38bdd4e85dSFrederic Weisbecker	select PREEMPT_COUNT
39*e335e3ebSRaghavendra K T	select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
40f8cbd99bSIngo Molnar	help
41f8cbd99bSIngo Molnar	  This option reduces the latency of the kernel by making
42f8cbd99bSIngo Molnar	  all kernel code (that is not executing in a critical section)
43f8cbd99bSIngo Molnar	  preemptible.  This allows reaction to interactive events by
44f8cbd99bSIngo Molnar	  permitting a low priority process to be preempted involuntarily
45f8cbd99bSIngo Molnar	  even if it is in kernel mode executing a system call and would
46f8cbd99bSIngo Molnar	  otherwise not be about to reach a natural preemption point.
47f8cbd99bSIngo Molnar	  This allows applications to run more 'smoothly' even when the
483dde6ad8SDavid Sterba	  system is under load, at the cost of slightly lower throughput
49f8cbd99bSIngo Molnar	  and a slight runtime overhead to kernel code.
50f8cbd99bSIngo Molnar
51f8cbd99bSIngo Molnar	  Select this if you are building a kernel for a desktop or
52f8cbd99bSIngo Molnar	  embedded system with latency requirements in the milliseconds
53f8cbd99bSIngo Molnar	  range.
54f8cbd99bSIngo Molnar
55f8cbd99bSIngo Molnarendchoice
56cc19ca86SIngo Molnar
57bdd4e85dSFrederic Weisbeckerconfig PREEMPT_COUNT
58bdd4e85dSFrederic Weisbecker       bool