Kconfig.debug 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # RCU-related debugging configuration options
  4. #
  5. menu "RCU Debugging"
  6. config PROVE_RCU
  7. def_bool PROVE_LOCKING
  8. config PROVE_RCU_LIST
  9. bool "RCU list lockdep debugging"
  10. depends on PROVE_RCU && RCU_EXPERT
  11. default n
  12. help
  13. Enable RCU lockdep checking for list usages. By default it is
  14. turned off since there are several list RCU users that still
  15. need to be converted to pass a lockdep expression. To prevent
  16. false-positive splats, we keep it default disabled but once all
  17. users are converted, we can remove this config option.
  18. config TORTURE_TEST
  19. tristate
  20. default n
  21. config RCU_SCALE_TEST
  22. tristate "performance tests for RCU"
  23. depends on DEBUG_KERNEL
  24. select TORTURE_TEST
  25. default n
  26. help
  27. This option provides a kernel module that runs performance
  28. tests on the RCU infrastructure. The kernel module may be built
  29. after the fact on the running kernel to be tested, if desired.
  30. Say Y here if you want RCU performance tests to be built into
  31. the kernel.
  32. Say M if you want the RCU performance tests to build as a module.
  33. Say N if you are unsure.
  34. config RCU_TORTURE_TEST
  35. tristate "torture tests for RCU"
  36. depends on DEBUG_KERNEL
  37. select TORTURE_TEST
  38. default n
  39. help
  40. This option provides a kernel module that runs torture tests
  41. on the RCU infrastructure. The kernel module may be built
  42. after the fact on the running kernel to be tested, if desired.
  43. Say Y here if you want RCU torture tests to be built into
  44. the kernel.
  45. Say M if you want the RCU torture tests to build as a module.
  46. Say N if you are unsure.
  47. config RCU_REF_SCALE_TEST
  48. tristate "Scalability tests for read-side synchronization (RCU and others)"
  49. depends on DEBUG_KERNEL
  50. select TORTURE_TEST
  51. default n
  52. help
  53. This option provides a kernel module that runs performance tests
  54. useful comparing RCU with various read-side synchronization mechanisms.
  55. The kernel module may be built after the fact on the running kernel to be
  56. tested, if desired.
  57. Say Y here if you want these performance tests built into the kernel.
  58. Say M if you want to build it as a module instead.
  59. Say N if you are unsure.
  60. config RCU_CPU_STALL_TIMEOUT
  61. int "RCU CPU stall timeout in seconds"
  62. depends on RCU_STALL_COMMON
  63. range 3 300
  64. default 21
  65. help
  66. If a given RCU grace period extends more than the specified
  67. number of seconds, a CPU stall warning is printed. If the
  68. RCU grace period persists, additional CPU stall warnings are
  69. printed at more widely spaced intervals.
  70. config RCU_EXP_CPU_STALL_TIMEOUT
  71. int "Expedited RCU CPU stall timeout in milliseconds"
  72. depends on RCU_STALL_COMMON
  73. range 0 300000
  74. default 0
  75. help
  76. If a given expedited RCU grace period extends more than the
  77. specified number of milliseconds, a CPU stall warning is printed.
  78. If the RCU grace period persists, additional CPU stall warnings
  79. are printed at more widely spaced intervals. A value of zero
  80. says to use the RCU_CPU_STALL_TIMEOUT value converted from
  81. seconds to milliseconds.
  82. config RCU_CPU_STALL_CPUTIME
  83. bool "Provide additional RCU stall debug information"
  84. depends on RCU_STALL_COMMON
  85. default n
  86. help
  87. Collect statistics during the sampling period, such as the number of
  88. (hard interrupts, soft interrupts, task switches) and the cputime of
  89. (hard interrupts, soft interrupts, kernel tasks) are added to the
  90. RCU stall report. For multiple continuous RCU stalls, all sampling
  91. periods begin at half of the first RCU stall timeout.
  92. The boot option rcupdate.rcu_cpu_stall_cputime has the same function
  93. as this one, but will override this if it exists.
  94. config RCU_CPU_STALL_NOTIFIER
  95. bool "Provide RCU CPU-stall notifiers"
  96. depends on RCU_STALL_COMMON
  97. depends on DEBUG_KERNEL
  98. depends on RCU_EXPERT
  99. default n
  100. help
  101. WARNING: You almost certainly do not want this!!!
  102. Enable RCU CPU-stall notifiers, which are invoked just before
  103. printing the RCU CPU stall warning. As such, bugs in notifier
  104. callbacks can prevent stall warnings from being printed.
  105. And the whole reason that a stall warning is being printed is
  106. that something is hung up somewhere. Therefore, the notifier
  107. callbacks must be written extremely carefully, preferably
  108. containing only lockless code. After all, it is quite possible
  109. that the whole reason that the RCU CPU stall is happening in
  110. the first place is that someone forgot to release whatever lock
  111. that you are thinking of acquiring. In which case, having your
  112. notifier callback acquire that lock will hang, preventing the
  113. RCU CPU stall warning from appearing.
  114. Say Y here if you want RCU CPU stall notifiers (you don't want them)
  115. Say N if you are unsure.
  116. config RCU_TRACE
  117. bool "Enable tracing for RCU"
  118. depends on DEBUG_KERNEL
  119. default y if TREE_RCU
  120. select TRACE_CLOCK
  121. help
  122. This option enables additional tracepoints for ftrace-style
  123. event tracing.
  124. Say Y here if you want to enable RCU tracing
  125. Say N if you are unsure.
  126. config RCU_EQS_DEBUG
  127. bool "Provide debugging asserts for adding NO_HZ support to an arch"
  128. depends on DEBUG_KERNEL
  129. help
  130. This option provides consistency checks in RCU's handling of
  131. NO_HZ. These checks have proven quite helpful in detecting
  132. bugs in arch-specific NO_HZ code.
  133. Say N here if you need ultimate kernel/user switch latencies
  134. Say Y if you are unsure
  135. config RCU_STRICT_GRACE_PERIOD
  136. bool "Provide debug RCU implementation with short grace periods"
  137. depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4 && !TINY_RCU
  138. default n
  139. select PREEMPT_COUNT if PREEMPT=n
  140. help
  141. Select this option to build an RCU variant that is strict about
  142. grace periods, making them as short as it can. This limits
  143. scalability, destroys real-time response, degrades battery
  144. lifetime and kills performance. Don't try this on large
  145. machines, as in systems with more than about 10 or 20 CPUs.
  146. But in conjunction with tools like KASAN, it can be helpful
  147. when looking for certain types of RCU usage bugs, for example,
  148. too-short RCU read-side critical sections.
  149. endmenu # "RCU Debugging"