18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_cichoice 48c2ecf20Sopenharmony_ci prompt "Preemption Model" 58c2ecf20Sopenharmony_ci default PREEMPT_NONE 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciconfig PREEMPT_NONE 88c2ecf20Sopenharmony_ci bool "No Forced Preemption (Server)" 98c2ecf20Sopenharmony_ci help 108c2ecf20Sopenharmony_ci This is the traditional Linux preemption model, geared towards 118c2ecf20Sopenharmony_ci throughput. It will still provide good latencies most of the 128c2ecf20Sopenharmony_ci time, but there are no guarantees and occasional longer delays 138c2ecf20Sopenharmony_ci are possible. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci Select this option if you are building a kernel for a server or 168c2ecf20Sopenharmony_ci scientific/computation system, or if you want to maximize the 178c2ecf20Sopenharmony_ci raw processing power of the kernel, irrespective of scheduling 188c2ecf20Sopenharmony_ci latencies. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciconfig PREEMPT_VOLUNTARY 218c2ecf20Sopenharmony_ci bool "Voluntary Kernel Preemption (Desktop)" 228c2ecf20Sopenharmony_ci depends on !ARCH_NO_PREEMPT 238c2ecf20Sopenharmony_ci help 248c2ecf20Sopenharmony_ci This option reduces the latency of the kernel by adding more 258c2ecf20Sopenharmony_ci "explicit preemption points" to the kernel code. These new 268c2ecf20Sopenharmony_ci preemption points have been selected to reduce the maximum 278c2ecf20Sopenharmony_ci latency of rescheduling, providing faster application reactions, 288c2ecf20Sopenharmony_ci at the cost of slightly lower throughput. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci This allows reaction to interactive events by allowing a 318c2ecf20Sopenharmony_ci low priority process to voluntarily preempt itself even if it 328c2ecf20Sopenharmony_ci is in kernel mode executing a system call. This allows 338c2ecf20Sopenharmony_ci applications to run more 'smoothly' even when the system is 348c2ecf20Sopenharmony_ci under load. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci Select this if you are building a kernel for a desktop system. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciconfig PREEMPT 398c2ecf20Sopenharmony_ci bool "Preemptible Kernel (Low-Latency Desktop)" 408c2ecf20Sopenharmony_ci depends on !ARCH_NO_PREEMPT 418c2ecf20Sopenharmony_ci select PREEMPTION 428c2ecf20Sopenharmony_ci select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK 438c2ecf20Sopenharmony_ci help 448c2ecf20Sopenharmony_ci This option reduces the latency of the kernel by making 458c2ecf20Sopenharmony_ci all kernel code (that is not executing in a critical section) 468c2ecf20Sopenharmony_ci preemptible. This allows reaction to interactive events by 478c2ecf20Sopenharmony_ci permitting a low priority process to be preempted involuntarily 488c2ecf20Sopenharmony_ci even if it is in kernel mode executing a system call and would 498c2ecf20Sopenharmony_ci otherwise not be about to reach a natural preemption point. 508c2ecf20Sopenharmony_ci This allows applications to run more 'smoothly' even when the 518c2ecf20Sopenharmony_ci system is under load, at the cost of slightly lower throughput 528c2ecf20Sopenharmony_ci and a slight runtime overhead to kernel code. 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci Select this if you are building a kernel for a desktop or 558c2ecf20Sopenharmony_ci embedded system with latency requirements in the milliseconds 568c2ecf20Sopenharmony_ci range. 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciconfig PREEMPT_RT 598c2ecf20Sopenharmony_ci bool "Fully Preemptible Kernel (Real-Time)" 608c2ecf20Sopenharmony_ci depends on EXPERT && ARCH_SUPPORTS_RT 618c2ecf20Sopenharmony_ci select PREEMPTION 628c2ecf20Sopenharmony_ci help 638c2ecf20Sopenharmony_ci This option turns the kernel into a real-time kernel by replacing 648c2ecf20Sopenharmony_ci various locking primitives (spinlocks, rwlocks, etc.) with 658c2ecf20Sopenharmony_ci preemptible priority-inheritance aware variants, enforcing 668c2ecf20Sopenharmony_ci interrupt threading and introducing mechanisms to break up long 678c2ecf20Sopenharmony_ci non-preemptible sections. This makes the kernel, except for very 688c2ecf20Sopenharmony_ci low level and critical code paths (entry code, scheduler, low 698c2ecf20Sopenharmony_ci level interrupt handling) fully preemptible and brings most 708c2ecf20Sopenharmony_ci execution contexts under scheduler control. 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci Select this if you are building a kernel for systems which 738c2ecf20Sopenharmony_ci require real-time guarantees. 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ciendchoice 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ciconfig PREEMPT_COUNT 788c2ecf20Sopenharmony_ci bool 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciconfig PREEMPTION 818c2ecf20Sopenharmony_ci bool 828c2ecf20Sopenharmony_ci select PREEMPT_COUNT 83