Kconfig 6.2 KB

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