Kconfig 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #
  2. # Timer subsystem related configuration options
  3. #
  4. # Options selectable by arch Kconfig
  5. # Watchdog function for clocksources to detect instabilities
  6. config CLOCKSOURCE_WATCHDOG
  7. bool
  8. # Architecture has extra clocksource data
  9. config ARCH_CLOCKSOURCE_DATA
  10. bool
  11. # Clocksources require validation of the clocksource against the last
  12. # cycle update - x86/TSC misfeature
  13. config CLOCKSOURCE_VALIDATE_LAST_CYCLE
  14. bool
  15. # Timekeeping vsyscall support
  16. config GENERIC_TIME_VSYSCALL
  17. bool
  18. # Timekeeping vsyscall support
  19. config GENERIC_TIME_VSYSCALL_OLD
  20. bool
  21. # Old style timekeeping
  22. config ARCH_USES_GETTIMEOFFSET
  23. bool
  24. # The generic clock events infrastructure
  25. config GENERIC_CLOCKEVENTS
  26. bool
  27. # Migration helper. Builds, but does not invoke
  28. config GENERIC_CLOCKEVENTS_BUILD
  29. bool
  30. default y
  31. depends on GENERIC_CLOCKEVENTS
  32. # Architecture can handle broadcast in a driver-agnostic way
  33. config ARCH_HAS_TICK_BROADCAST
  34. bool
  35. # Clockevents broadcasting infrastructure
  36. config GENERIC_CLOCKEVENTS_BROADCAST
  37. bool
  38. depends on GENERIC_CLOCKEVENTS
  39. # Automatically adjust the min. reprogramming time for
  40. # clock event device
  41. config GENERIC_CLOCKEVENTS_MIN_ADJUST
  42. bool
  43. # Generic update of CMOS clock
  44. config GENERIC_CMOS_UPDATE
  45. bool
  46. if GENERIC_CLOCKEVENTS
  47. menu "Timers subsystem"
  48. # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
  49. # only related to the tick functionality. Oneshot clockevent devices
  50. # are supported independ of this.
  51. config TICK_ONESHOT
  52. bool
  53. config NO_HZ_COMMON
  54. bool
  55. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  56. select TICK_ONESHOT
  57. choice
  58. prompt "Timer tick handling"
  59. default NO_HZ_IDLE if NO_HZ
  60. config HZ_PERIODIC
  61. bool "Periodic timer ticks (constant rate, no dynticks)"
  62. help
  63. This option keeps the tick running periodically at a constant
  64. rate, even when the CPU doesn't need it.
  65. config NO_HZ_IDLE
  66. bool "Idle dynticks system (tickless idle)"
  67. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  68. select NO_HZ_COMMON
  69. help
  70. This option enables a tickless idle system: timer interrupts
  71. will only trigger on an as-needed basis when the system is idle.
  72. This is usually interesting for energy saving.
  73. Most of the time you want to say Y here.
  74. config NO_HZ_FULL
  75. bool "Full dynticks system (tickless)"
  76. # NO_HZ_COMMON dependency
  77. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  78. # We need at least one periodic CPU for timekeeping
  79. depends on SMP
  80. # RCU_USER_QS dependency
  81. depends on HAVE_CONTEXT_TRACKING
  82. # VIRT_CPU_ACCOUNTING_GEN dependency
  83. depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
  84. select NO_HZ_COMMON
  85. select RCU_USER_QS
  86. select RCU_NOCB_CPU
  87. select VIRT_CPU_ACCOUNTING_GEN
  88. select IRQ_WORK
  89. help
  90. Adaptively try to shutdown the tick whenever possible, even when
  91. the CPU is running tasks. Typically this requires running a single
  92. task on the CPU. Chances for running tickless are maximized when
  93. the task mostly runs in userspace and has few kernel activity.
  94. You need to fill up the nohz_full boot parameter with the
  95. desired range of dynticks CPUs.
  96. This is implemented at the expense of some overhead in user <-> kernel
  97. transitions: syscalls, exceptions and interrupts. Even when it's
  98. dynamically off.
  99. Say N.
  100. endchoice
  101. config NO_HZ_FULL_ALL
  102. bool "Full dynticks system on all CPUs by default (except CPU 0)"
  103. depends on NO_HZ_FULL
  104. help
  105. If the user doesn't pass the nohz_full boot option to
  106. define the range of full dynticks CPUs, consider that all
  107. CPUs in the system are full dynticks by default.
  108. Note the boot CPU will still be kept outside the range to
  109. handle the timekeeping duty.
  110. config NO_HZ_FULL_SYSIDLE
  111. bool "Detect full-system idle state for full dynticks system"
  112. depends on NO_HZ_FULL
  113. default n
  114. help
  115. At least one CPU must keep the scheduling-clock tick running for
  116. timekeeping purposes whenever there is a non-idle CPU, where
  117. "non-idle" also includes dynticks CPUs as long as they are
  118. running non-idle tasks. Because the underlying adaptive-tick
  119. support cannot distinguish between all CPUs being idle and
  120. all CPUs each running a single task in dynticks mode, the
  121. underlying support simply ensures that there is always a CPU
  122. handling the scheduling-clock tick, whether or not all CPUs
  123. are idle. This Kconfig option enables scalable detection of
  124. the all-CPUs-idle state, thus allowing the scheduling-clock
  125. tick to be disabled when all CPUs are idle. Note that scalable
  126. detection of the all-CPUs-idle state means that larger systems
  127. will be slower to declare the all-CPUs-idle state.
  128. Say Y if you would like to help debug all-CPUs-idle detection.
  129. Say N if you are unsure.
  130. config NO_HZ_FULL_SYSIDLE_SMALL
  131. int "Number of CPUs above which large-system approach is used"
  132. depends on NO_HZ_FULL_SYSIDLE
  133. range 1 NR_CPUS
  134. default 8
  135. help
  136. The full-system idle detection mechanism takes a lazy approach
  137. on large systems, as is required to attain decent scalability.
  138. However, on smaller systems, scalability is not anywhere near as
  139. large a concern as is energy efficiency. The sysidle subsystem
  140. therefore uses a fast but non-scalable algorithm for small
  141. systems and a lazier but scalable algorithm for large systems.
  142. This Kconfig parameter defines the number of CPUs in the largest
  143. system that will be considered to be "small".
  144. The default value will be fine in most cases. Battery-powered
  145. systems that (1) enable NO_HZ_FULL_SYSIDLE, (2) have larger
  146. numbers of CPUs, and (3) are suffering from battery-lifetime
  147. problems due to long sysidle latencies might wish to experiment
  148. with larger values for this Kconfig parameter. On the other
  149. hand, they might be even better served by disabling NO_HZ_FULL
  150. entirely, given that NO_HZ_FULL is intended for HPC and
  151. real-time workloads that at present do not tend to be run on
  152. battery-powered systems.
  153. Take the default if you are unsure.
  154. config NO_HZ
  155. bool "Old Idle dynticks config"
  156. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  157. help
  158. This is the old config entry that enables dynticks idle.
  159. We keep it around for a little while to enforce backward
  160. compatibility with older config files.
  161. config HIGH_RES_TIMERS
  162. bool "High Resolution Timer Support"
  163. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  164. select TICK_ONESHOT
  165. help
  166. This option enables high resolution timer support. If your
  167. hardware is not capable then this option only increases
  168. the size of the kernel image.
  169. endmenu
  170. endif