1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2cc19ca86SIngo Molnar 3f8cbd99bSIngo Molnarchoice 4f8cbd99bSIngo Molnar prompt "Preemption Model" 5f8cbd99bSIngo Molnar default PREEMPT_NONE 6f8cbd99bSIngo Molnar 7f8cbd99bSIngo Molnarconfig PREEMPT_NONE 8f8cbd99bSIngo Molnar bool "No Forced Preemption (Server)" 9cc19ca86SIngo Molnar help 10f8cbd99bSIngo Molnar This is the traditional Linux preemption model, geared towards 11f8cbd99bSIngo Molnar throughput. It will still provide good latencies most of the 12f8cbd99bSIngo Molnar time, but there are no guarantees and occasional longer delays 13f8cbd99bSIngo Molnar are possible. 14f8cbd99bSIngo Molnar 15f8cbd99bSIngo Molnar Select this option if you are building a kernel for a server or 16f8cbd99bSIngo Molnar scientific/computation system, or if you want to maximize the 17f8cbd99bSIngo Molnar raw processing power of the kernel, irrespective of scheduling 18f8cbd99bSIngo Molnar latencies. 19f8cbd99bSIngo Molnar 20f8cbd99bSIngo Molnarconfig PREEMPT_VOLUNTARY 21f8cbd99bSIngo Molnar bool "Voluntary Kernel Preemption (Desktop)" 2287a4c375SChristoph Hellwig depends on !ARCH_NO_PREEMPT 23f8cbd99bSIngo Molnar help 24f8cbd99bSIngo Molnar This option reduces the latency of the kernel by adding more 25f8cbd99bSIngo Molnar "explicit preemption points" to the kernel code. These new 26f8cbd99bSIngo Molnar preemption points have been selected to reduce the maximum 27f8cbd99bSIngo Molnar latency of rescheduling, providing faster application reactions, 283dde6ad8SDavid Sterba at the cost of slightly lower throughput. 29f8cbd99bSIngo Molnar 30f8cbd99bSIngo Molnar This allows reaction to interactive events by allowing a 31f8cbd99bSIngo Molnar low priority process to voluntarily preempt itself even if it 32f8cbd99bSIngo Molnar is in kernel mode executing a system call. This allows 33f8cbd99bSIngo Molnar applications to run more 'smoothly' even when the system is 34cc19ca86SIngo Molnar under load. 35cc19ca86SIngo Molnar 36f8cbd99bSIngo Molnar Select this if you are building a kernel for a desktop system. 37f8cbd99bSIngo Molnar 38*a50a3f4bSThomas Gleixnerconfig PREEMPT_LL 39f8cbd99bSIngo Molnar bool "Preemptible Kernel (Low-Latency Desktop)" 4087a4c375SChristoph Hellwig depends on !ARCH_NO_PREEMPT 41*a50a3f4bSThomas Gleixner select PREEMPT 42e335e3ebSRaghavendra K T select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK 43f8cbd99bSIngo Molnar help 44f8cbd99bSIngo Molnar This option reduces the latency of the kernel by making 45f8cbd99bSIngo Molnar all kernel code (that is not executing in a critical section) 46f8cbd99bSIngo Molnar preemptible. This allows reaction to interactive events by 47f8cbd99bSIngo Molnar permitting a low priority process to be preempted involuntarily 48f8cbd99bSIngo Molnar even if it is in kernel mode executing a system call and would 49f8cbd99bSIngo Molnar otherwise not be about to reach a natural preemption point. 50f8cbd99bSIngo Molnar This allows applications to run more 'smoothly' even when the 513dde6ad8SDavid Sterba system is under load, at the cost of slightly lower throughput 52f8cbd99bSIngo Molnar and a slight runtime overhead to kernel code. 53f8cbd99bSIngo Molnar 54f8cbd99bSIngo Molnar Select this if you are building a kernel for a desktop or 55f8cbd99bSIngo Molnar embedded system with latency requirements in the milliseconds 56f8cbd99bSIngo Molnar range. 57f8cbd99bSIngo Molnar 58*a50a3f4bSThomas Gleixnerconfig PREEMPT_RT 59*a50a3f4bSThomas Gleixner bool "Fully Preemptible Kernel (Real-Time)" 60*a50a3f4bSThomas Gleixner depends on EXPERT && ARCH_SUPPORTS_RT 61*a50a3f4bSThomas Gleixner select PREEMPT 62*a50a3f4bSThomas Gleixner help 63*a50a3f4bSThomas Gleixner This option turns the kernel into a real-time kernel by replacing 64*a50a3f4bSThomas Gleixner various locking primitives (spinlocks, rwlocks, etc.) with 65*a50a3f4bSThomas Gleixner preemptible priority-inheritance aware variants, enforcing 66*a50a3f4bSThomas Gleixner interrupt threading and introducing mechanisms to break up long 67*a50a3f4bSThomas Gleixner non-preemptible sections. This makes the kernel, except for very 68*a50a3f4bSThomas Gleixner low level and critical code pathes (entry code, scheduler, low 69*a50a3f4bSThomas Gleixner level interrupt handling) fully preemptible and brings most 70*a50a3f4bSThomas Gleixner execution contexts under scheduler control. 71*a50a3f4bSThomas Gleixner 72*a50a3f4bSThomas Gleixner Select this if you are building a kernel for systems which 73*a50a3f4bSThomas Gleixner require real-time guarantees. 74*a50a3f4bSThomas Gleixner 75f8cbd99bSIngo Molnarendchoice 76cc19ca86SIngo Molnar 77bdd4e85dSFrederic Weisbeckerconfig PREEMPT_COUNT 78bdd4e85dSFrederic Weisbecker bool 79*a50a3f4bSThomas Gleixner 80*a50a3f4bSThomas Gleixnerconfig PREEMPT 81*a50a3f4bSThomas Gleixner bool 82*a50a3f4bSThomas Gleixner select PREEMPT_COUNT 83