Kconfig.preempt 3.0 KB

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