Kconfig 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. select NO_HZ_COMMON
  84. select RCU_USER_QS
  85. select RCU_NOCB_CPU
  86. select VIRT_CPU_ACCOUNTING_GEN
  87. select IRQ_WORK
  88. help
  89. Adaptively try to shutdown the tick whenever possible, even when
  90. the CPU is running tasks. Typically this requires running a single
  91. task on the CPU. Chances for running tickless are maximized when
  92. the task mostly runs in userspace and has few kernel activity.
  93. You need to fill up the nohz_full boot parameter with the
  94. desired range of dynticks CPUs.
  95. This is implemented at the expense of some overhead in user <-> kernel
  96. transitions: syscalls, exceptions and interrupts. Even when it's
  97. dynamically off.
  98. Say N.
  99. endchoice
  100. config NO_HZ_FULL_ALL
  101. bool "Full dynticks system on all CPUs by default"
  102. depends on NO_HZ_FULL
  103. help
  104. If the user doesn't pass the nohz_full boot option to
  105. define the range of full dynticks CPUs, consider that all
  106. CPUs in the system are full dynticks by default.
  107. Note the boot CPU will still be kept outside the range to
  108. handle the timekeeping duty.
  109. config NO_HZ_FULL_SYSIDLE
  110. bool "Detect full-system idle state for full dynticks system"
  111. depends on NO_HZ_FULL
  112. default n
  113. help
  114. At least one CPU must keep the scheduling-clock tick running for
  115. timekeeping purposes whenever there is a non-idle CPU, where
  116. "non-idle" also includes dynticks CPUs as long as they are
  117. running non-idle tasks. Because the underlying adaptive-tick
  118. support cannot distinguish between all CPUs being idle and
  119. all CPUs each running a single task in dynticks mode, the
  120. underlying support simply ensures that there is always a CPU
  121. handling the scheduling-clock tick, whether or not all CPUs
  122. are idle. This Kconfig option enables scalable detection of
  123. the all-CPUs-idle state, thus allowing the scheduling-clock
  124. tick to be disabled when all CPUs are idle. Note that scalable
  125. detection of the all-CPUs-idle state means that larger systems
  126. will be slower to declare the all-CPUs-idle state.
  127. Say Y if you would like to help debug all-CPUs-idle detection.
  128. Say N if you are unsure.
  129. config NO_HZ_FULL_SYSIDLE_SMALL
  130. int "Number of CPUs above which large-system approach is used"
  131. depends on NO_HZ_FULL_SYSIDLE
  132. range 1 NR_CPUS
  133. default 8
  134. help
  135. The full-system idle detection mechanism takes a lazy approach
  136. on large systems, as is required to attain decent scalability.
  137. However, on smaller systems, scalability is not anywhere near as
  138. large a concern as is energy efficiency. The sysidle subsystem
  139. therefore uses a fast but non-scalable algorithm for small
  140. systems and a lazier but scalable algorithm for large systems.
  141. This Kconfig parameter defines the number of CPUs in the largest
  142. system that will be considered to be "small".
  143. The default value will be fine in most cases. Battery-powered
  144. systems that (1) enable NO_HZ_FULL_SYSIDLE, (2) have larger
  145. numbers of CPUs, and (3) are suffering from battery-lifetime
  146. problems due to long sysidle latencies might wish to experiment
  147. with larger values for this Kconfig parameter. On the other
  148. hand, they might be even better served by disabling NO_HZ_FULL
  149. entirely, given that NO_HZ_FULL is intended for HPC and
  150. real-time workloads that at present do not tend to be run on
  151. battery-powered systems.
  152. Take the default if you are unsure.
  153. config NO_HZ
  154. bool "Old Idle dynticks config"
  155. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  156. help
  157. This is the old config entry that enables dynticks idle.
  158. We keep it around for a little while to enforce backward
  159. compatibility with older config files.
  160. config HIGH_RES_TIMERS
  161. bool "High Resolution Timer Support"
  162. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  163. select TICK_ONESHOT
  164. help
  165. This option enables high resolution timer support. If your
  166. hardware is not capable then this option only increases
  167. the size of the kernel image.
  168. endmenu
  169. endif