Kconfig 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Timer subsystem related configuration options
  4. #
  5. # Options selectable by arch Kconfig
  6. # Watchdog function for clocksources to detect instabilities
  7. config CLOCKSOURCE_WATCHDOG
  8. bool
  9. # Architecture has extra clocksource data
  10. config ARCH_CLOCKSOURCE_DATA
  11. bool
  12. # Architecture has extra clocksource init called from registration
  13. config ARCH_CLOCKSOURCE_INIT
  14. bool
  15. # Clocksources require validation of the clocksource against the last
  16. # cycle update - x86/TSC misfeature
  17. config CLOCKSOURCE_VALIDATE_LAST_CYCLE
  18. bool
  19. # Timekeeping vsyscall support
  20. config GENERIC_TIME_VSYSCALL
  21. bool
  22. # Old style timekeeping
  23. config ARCH_USES_GETTIMEOFFSET
  24. bool
  25. # The generic clock events infrastructure
  26. config GENERIC_CLOCKEVENTS
  27. bool
  28. # Architecture can handle broadcast in a driver-agnostic way
  29. config ARCH_HAS_TICK_BROADCAST
  30. bool
  31. # Clockevents broadcasting infrastructure
  32. config GENERIC_CLOCKEVENTS_BROADCAST
  33. bool
  34. depends on GENERIC_CLOCKEVENTS
  35. # Automatically adjust the min. reprogramming time for
  36. # clock event device
  37. config GENERIC_CLOCKEVENTS_MIN_ADJUST
  38. bool
  39. # Generic update of CMOS clock
  40. config GENERIC_CMOS_UPDATE
  41. bool
  42. # Select to handle posix CPU timers from task_work
  43. # and not from the timer interrupt context
  44. config HAVE_POSIX_CPU_TIMERS_TASK_WORK
  45. bool
  46. config POSIX_CPU_TIMERS_TASK_WORK
  47. bool
  48. default y if POSIX_TIMERS && HAVE_POSIX_CPU_TIMERS_TASK_WORK
  49. if GENERIC_CLOCKEVENTS
  50. menu "Timers subsystem"
  51. # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
  52. # only related to the tick functionality. Oneshot clockevent devices
  53. # are supported independent of this.
  54. config TICK_ONESHOT
  55. bool
  56. config NO_HZ_COMMON
  57. bool
  58. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  59. select TICK_ONESHOT
  60. choice
  61. prompt "Timer tick handling"
  62. default NO_HZ_IDLE if NO_HZ
  63. config HZ_PERIODIC
  64. bool "Periodic timer ticks (constant rate, no dynticks)"
  65. help
  66. This option keeps the tick running periodically at a constant
  67. rate, even when the CPU doesn't need it.
  68. config NO_HZ_IDLE
  69. bool "Idle dynticks system (tickless idle)"
  70. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  71. select NO_HZ_COMMON
  72. help
  73. This option enables a tickless idle system: timer interrupts
  74. will only trigger on an as-needed basis when the system is idle.
  75. This is usually interesting for energy saving.
  76. Most of the time you want to say Y here.
  77. config NO_HZ_FULL
  78. bool "Full dynticks system (tickless)"
  79. # NO_HZ_COMMON dependency
  80. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  81. # We need at least one periodic CPU for timekeeping
  82. depends on SMP
  83. depends on HAVE_CONTEXT_TRACKING
  84. # VIRT_CPU_ACCOUNTING_GEN dependency
  85. depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
  86. select NO_HZ_COMMON
  87. select RCU_NOCB_CPU
  88. select VIRT_CPU_ACCOUNTING_GEN
  89. select IRQ_WORK
  90. select CPU_ISOLATION
  91. help
  92. Adaptively try to shutdown the tick whenever possible, even when
  93. the CPU is running tasks. Typically this requires running a single
  94. task on the CPU. Chances for running tickless are maximized when
  95. the task mostly runs in userspace and has few kernel activity.
  96. You need to fill up the nohz_full boot parameter with the
  97. desired range of dynticks CPUs.
  98. This is implemented at the expense of some overhead in user <-> kernel
  99. transitions: syscalls, exceptions and interrupts. Even when it's
  100. dynamically off.
  101. Say N.
  102. endchoice
  103. config CONTEXT_TRACKING
  104. bool
  105. config CONTEXT_TRACKING_FORCE
  106. bool "Force context tracking"
  107. depends on CONTEXT_TRACKING
  108. default y if !NO_HZ_FULL
  109. help
  110. The major pre-requirement for full dynticks to work is to
  111. support the context tracking subsystem. But there are also
  112. other dependencies to provide in order to make the full
  113. dynticks working.
  114. This option stands for testing when an arch implements the
  115. context tracking backend but doesn't yet fullfill all the
  116. requirements to make the full dynticks feature working.
  117. Without the full dynticks, there is no way to test the support
  118. for context tracking and the subsystems that rely on it: RCU
  119. userspace extended quiescent state and tickless cputime
  120. accounting. This option copes with the absence of the full
  121. dynticks subsystem by forcing the context tracking on all
  122. CPUs in the system.
  123. Say Y only if you're working on the development of an
  124. architecture backend for the context tracking.
  125. Say N otherwise, this option brings an overhead that you
  126. don't want in production.
  127. config NO_HZ
  128. bool "Old Idle dynticks config"
  129. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  130. help
  131. This is the old config entry that enables dynticks idle.
  132. We keep it around for a little while to enforce backward
  133. compatibility with older config files.
  134. config HIGH_RES_TIMERS
  135. bool "High Resolution Timer Support"
  136. depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
  137. select TICK_ONESHOT
  138. help
  139. This option enables high resolution timer support. If your
  140. hardware is not capable then this option only increases
  141. the size of the kernel image.
  142. endmenu
  143. endif