Merge tag 'mm-nonmm-stable-2023-02-20-15-29' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / lib / Kconfig.debug
index 2e91421e096e72ea95653a7a6f678bce912707c2..c8b379e2e9adc14f0a79dbb2b97497a356a2c6e5 100644 (file)
@@ -1185,13 +1185,16 @@ config DEBUG_TIMEKEEPING
 config DEBUG_PREEMPT
        bool "Debug preemptible kernel"
        depends on DEBUG_KERNEL && PREEMPTION && TRACE_IRQFLAGS_SUPPORT
-       default y
        help
          If you say Y here then the kernel will use a debug variant of the
          commonly used smp_processor_id() function and will print warnings
          if kernel code uses it in a preemption-unsafe way. Also, the kernel
          will detect preemption count underflows.
 
+         This option has potential to introduce high runtime overhead,
+         depending on workload as it triggers debugging routines for each
+         this_cpu operation. It should only be used for debugging purposes.
+
 menu "Lock Debugging (spinlocks, mutexes, etc...)"
 
 config LOCK_DEBUGGING_SUPPORT
@@ -2029,6 +2032,41 @@ menuconfig RUNTIME_TESTING_MENU
 
 if RUNTIME_TESTING_MENU
 
+config TEST_DHRY
+       tristate "Dhrystone benchmark test"
+       help
+         Enable this to include the Dhrystone 2.1 benchmark.  This test
+         calculates the number of Dhrystones per second, and the number of
+         DMIPS (Dhrystone MIPS) obtained when the Dhrystone score is divided
+         by 1757 (the number of Dhrystones per second obtained on the VAX
+         11/780, nominally a 1 MIPS machine).
+
+         To run the benchmark, it needs to be enabled explicitly, either from
+         the kernel command line (when built-in), or from userspace (when
+         built-in or modular.
+
+         Run once during kernel boot:
+
+             test_dhry.run
+
+         Set number of iterations from kernel command line:
+
+             test_dhry.iterations=<n>
+
+         Set number of iterations from userspace:
+
+             echo <n> > /sys/module/test_dhry/parameters/iterations
+
+         Trigger manual run from userspace:
+
+             echo y > /sys/module/test_dhry/parameters/run
+
+         If the number of iterations is <= 0, the test will devise a suitable
+         number of iterations (test runs for at least 2s) automatically.
+         This process takes ca. 4s.
+
+         If unsure, say N.
+
 config LKDTM
        tristate "Linux Kernel Dump Test Tool Module"
        depends on DEBUG_FS