Kconfig 6.2 KB

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