Kconfig 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Timer subsystem related configuration options
  4. #
  5. # Options selectable by arch Kconfig
  6. # Watchdog function for clocksources to detect instabilities
  7. config CLOCKSOURCE_WATCHDOG
  8. bool
  9. # Architecture has extra clocksource data
  10. config ARCH_CLOCKSOURCE_DATA
  11. bool
  12. # Architecture has extra clocksource init called from registration
  13. config ARCH_CLOCKSOURCE_INIT
  14. bool
  15. # Clocksources require validation of the clocksource against the last
  16. # cycle update - x86/TSC misfeature
  17. config CLOCKSOURCE_VALIDATE_LAST_CYCLE
  18. bool
  19. # Timekeeping vsyscall support
  20. config GENERIC_TIME_VSYSCALL
  21. bool
  22. # The generic clock events infrastructure
  23. config GENERIC_CLOCKEVENTS
  24. def_bool !LEGACY_TIMER_TICK
  25. # Architecture can handle broadcast in a driver-agnostic way
  26. config ARCH_HAS_TICK_BROADCAST
  27. bool
  28. # Clockevents broadcasting infrastructure
  29. config GENERIC_CLOCKEVENTS_BROADCAST
  30. bool
  31. depends on GENERIC_CLOCKEVENTS
  32. # Automatically adjust the min. reprogramming time for
  33. # clock event device
  34. config GENERIC_CLOCKEVENTS_MIN_ADJUST
  35. bool
  36. # Generic update of CMOS clock
  37. config GENERIC_CMOS_UPDATE
  38. bool
  39. # Select to handle posix CPU timers from task_work
  40. # and not from the timer interrupt context
  41. config HAVE_POSIX_CPU_TIMERS_TASK_WORK
  42. bool
  43. config POSIX_CPU_TIMERS_TASK_WORK
  44. bool
  45. default y if POSIX_TIMERS && HAVE_POSIX_CPU_TIMERS_TASK_WORK
  46. config LEGACY_TIMER_TICK
  47. bool
  48. help
  49. The legacy timer tick helper is used by platforms that
  50. lack support for the generic clockevent framework.
  51. New platforms should use generic clockevents instead.
  52. config TIME_KUNIT_TEST
  53. tristate "KUnit test for kernel/time functions" if !KUNIT_ALL_TESTS
  54. depends on KUNIT
  55. default KUNIT_ALL_TESTS
  56. help
  57. Enable this option to test RTC library functions.
  58. If unsure, say N.
  59. config CONTEXT_TRACKING
  60. bool
  61. config CONTEXT_TRACKING_IDLE
  62. bool
  63. select CONTEXT_TRACKING
  64. help
  65. Tracks idle state on behalf of RCU.
  66. if GENERIC_CLOCKEVENTS
  67. menu "Timers subsystem"
  68. # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
  69. # only related to the tick functionality. Oneshot clockevent devices
  70. # are supported independent of this.
  71. config TICK_ONESHOT
  72. bool
  73. config NO_HZ_COMMON
  74. bool
  75. select TICK_ONESHOT
  76. choice
  77. prompt "Timer tick handling"
  78. default NO_HZ_IDLE if NO_HZ
  79. config HZ_PERIODIC
  80. bool "Periodic timer ticks (constant rate, no dynticks)"
  81. help
  82. This option keeps the tick running periodically at a constant
  83. rate, even when the CPU doesn't need it.
  84. config NO_HZ_IDLE
  85. bool "Idle dynticks system (tickless idle)"
  86. select NO_HZ_COMMON
  87. help
  88. This option enables a tickless idle system: timer interrupts
  89. will only trigger on an as-needed basis when the system is idle.
  90. This is usually interesting for energy saving.
  91. Most of the time you want to say Y here.
  92. config NO_HZ_FULL
  93. bool "Full dynticks system (tickless)"
  94. # NO_HZ_COMMON dependency
  95. # We need at least one periodic CPU for timekeeping
  96. depends on SMP
  97. depends on HAVE_CONTEXT_TRACKING_USER
  98. # VIRT_CPU_ACCOUNTING_GEN dependency
  99. depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
  100. select NO_HZ_COMMON
  101. select RCU_NOCB_CPU
  102. select VIRT_CPU_ACCOUNTING_GEN
  103. select IRQ_WORK
  104. select CPU_ISOLATION
  105. help
  106. Adaptively try to shutdown the tick whenever possible, even when
  107. the CPU is running tasks. Typically this requires running a single
  108. task on the CPU. Chances for running tickless are maximized when
  109. the task mostly runs in userspace and has few kernel activity.
  110. You need to fill up the nohz_full boot parameter with the
  111. desired range of dynticks CPUs to use it. This is implemented at
  112. the expense of some overhead in user <-> kernel transitions:
  113. syscalls, exceptions and interrupts.
  114. By default, without passing the nohz_full parameter, this behaves just
  115. like NO_HZ_IDLE.
  116. If you're a distro say Y.
  117. endchoice
  118. config CONTEXT_TRACKING_USER
  119. bool
  120. depends on HAVE_CONTEXT_TRACKING_USER
  121. select CONTEXT_TRACKING
  122. help
  123. Track transitions between kernel and user on behalf of RCU and
  124. tickless cputime accounting. The former case relies on context
  125. tracking to enter/exit RCU extended quiescent states.
  126. config CONTEXT_TRACKING_USER_FORCE
  127. bool "Force user context tracking"
  128. depends on CONTEXT_TRACKING_USER
  129. default y if !NO_HZ_FULL
  130. help
  131. The major pre-requirement for full dynticks to work is to
  132. support the user context tracking subsystem. But there are also
  133. other dependencies to provide in order to make the full
  134. dynticks working.
  135. This option stands for testing when an arch implements the
  136. user context tracking backend but doesn't yet fulfill all the
  137. requirements to make the full dynticks feature working.
  138. Without the full dynticks, there is no way to test the support
  139. for user context tracking and the subsystems that rely on it: RCU
  140. userspace extended quiescent state and tickless cputime
  141. accounting. This option copes with the absence of the full
  142. dynticks subsystem by forcing the user context tracking on all
  143. CPUs in the system.
  144. Say Y only if you're working on the development of an
  145. architecture backend for the user context tracking.
  146. Say N otherwise, this option brings an overhead that you
  147. don't want in production.
  148. config NO_HZ
  149. bool "Old Idle dynticks config"
  150. help
  151. This is the old config entry that enables dynticks idle.
  152. We keep it around for a little while to enforce backward
  153. compatibility with older config files.
  154. config HIGH_RES_TIMERS
  155. bool "High Resolution Timer Support"
  156. select TICK_ONESHOT
  157. help
  158. This option enables high resolution timer support. If your
  159. hardware is not capable then this option only increases
  160. the size of the kernel image.
  161. config CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
  162. int "Clocksource watchdog maximum allowable skew (in μs)"
  163. depends on CLOCKSOURCE_WATCHDOG
  164. range 50 1000
  165. default 100
  166. help
  167. Specify the maximum amount of allowable watchdog skew in
  168. microseconds before reporting the clocksource to be unstable.
  169. endmenu
  170. endif