Kconfig 6.3 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. # Timekeeping vsyscall support
  12. config GENERIC_TIME_VSYSCALL
  13. bool
  14. # Timekeeping vsyscall support
  15. config GENERIC_TIME_VSYSCALL_OLD
  16. bool
  17. # ktime_t scalar 64bit nsec representation
  18. config KTIME_SCALAR
  19. bool
  20. # Old style timekeeping
  21. config ARCH_USES_GETTIMEOFFSET
  22. bool
  23. # The generic clock events infrastructure
  24. config GENERIC_CLOCKEVENTS
  25. bool
  26. # Migration helper. Builds, but does not invoke
  27. config GENERIC_CLOCKEVENTS_BUILD
  28. bool
  29. default y
  30. depends on GENERIC_CLOCKEVENTS
  31. # Architecture can handle broadcast in a driver-agnostic way
  32. config ARCH_HAS_TICK_BROADCAST
  33. bool
  34. # Clockevents broadcasting infrastructure
  35. config GENERIC_CLOCKEVENTS_BROADCAST
  36. bool
  37. depends on GENERIC_CLOCKEVENTS
  38. # Automatically adjust the min. reprogramming time for
  39. # clock event device
  40. config GENERIC_CLOCKEVENTS_MIN_ADJUST
  41. bool
  42. # Generic update of CMOS clock
  43. config GENERIC_CMOS_UPDATE
  44. bool
  45. if GENERIC_CLOCKEVENTS
  46. menu "Timers subsystem"
  47. # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
  48. # only related to the tick functionality. Oneshot clockevent devices
  49. # are supported independ of this.
  50. config TICK_ONESHOT
  51. bool
  52. config NO_HZ_COMMON
  53. bool
  54. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  55. select TICK_ONESHOT
  56. choice
  57. prompt "Timer tick handling"
  58. default NO_HZ_IDLE if NO_HZ
  59. config HZ_PERIODIC
  60. bool "Periodic timer ticks (constant rate, no dynticks)"
  61. help
  62. This option keeps the tick running periodically at a constant
  63. rate, even when the CPU doesn't need it.
  64. config NO_HZ_IDLE
  65. bool "Idle dynticks system (tickless idle)"
  66. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  67. select NO_HZ_COMMON
  68. help
  69. This option enables a tickless idle system: timer interrupts
  70. will only trigger on an as-needed basis when the system is idle.
  71. This is usually interesting for energy saving.
  72. Most of the time you want to say Y here.
  73. config NO_HZ_FULL
  74. bool "Full dynticks system (tickless)"
  75. # NO_HZ_COMMON dependency
  76. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  77. # We need at least one periodic CPU for timekeeping
  78. depends on SMP
  79. # RCU_USER_QS dependency
  80. depends on HAVE_CONTEXT_TRACKING
  81. # VIRT_CPU_ACCOUNTING_GEN dependency
  82. depends on 64BIT
  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"
  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