Kconfig.debug (50501936288d6a29d7ef78f25d00e33240fad45f) Kconfig.debug (a66d733da8010c732979041cd602cfceab7f587b)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "Kernel hacking"
3
4menu "printk and dmesg options"
5
6config PRINTK_TIME
7 bool "Show timing information on printks"
8 depends on PRINTK

--- 1021 unchanged lines hidden (view full) ---

1030 The panic can be used in combination with panic_timeout,
1031 to cause the system to reboot automatically after a
1032 lockup has been detected. This feature is useful for
1033 high-availability systems that have uptime guarantees and
1034 where a lockup must be resolved ASAP.
1035
1036 Say N if unsure.
1037
1# SPDX-License-Identifier: GPL-2.0-only
2menu "Kernel hacking"
3
4menu "printk and dmesg options"
5
6config PRINTK_TIME
7 bool "Show timing information on printks"
8 depends on PRINTK

--- 1021 unchanged lines hidden (view full) ---

1030 The panic can be used in combination with panic_timeout,
1031 to cause the system to reboot automatically after a
1032 lockup has been detected. This feature is useful for
1033 high-availability systems that have uptime guarantees and
1034 where a lockup must be resolved ASAP.
1035
1036 Say N if unsure.
1037
1038config HARDLOCKUP_DETECTOR_PERF
1038config HAVE_HARDLOCKUP_DETECTOR_BUDDY
1039 bool
1039 bool
1040 select SOFTLOCKUP_DETECTOR
1040 depends on SMP
1041 default y
1041
1042#
1042
1043#
1043# Enables a timestamp based low pass filter to compensate for perf based
1044# hard lockup detection which runs too fast due to turbo modes.
1044# Global switch whether to build a hardlockup detector at all. It is available
1045# only when the architecture supports at least one implementation. There are
1046# two exceptions. The hardlockup detector is never enabled on:
1045#
1047#
1046config HARDLOCKUP_CHECK_TIMESTAMP
1047 bool
1048
1048# s390: it reported many false positives there
1049#
1049#
1050# arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard
1051# lockup detector rather than the perf based detector.
1050# sparc64: has a custom implementation which is not using the common
1051# hardlockup command line options and sysctl interface.
1052#
1053config HARDLOCKUP_DETECTOR
1054 bool "Detect Hard Lockups"
1052#
1053config HARDLOCKUP_DETECTOR
1054 bool "Detect Hard Lockups"
1055 depends on DEBUG_KERNEL && !S390
1056 depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH
1055 depends on DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64
1056 depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH
1057 imply HARDLOCKUP_DETECTOR_PERF
1058 imply HARDLOCKUP_DETECTOR_BUDDY
1059 imply HARDLOCKUP_DETECTOR_ARCH
1057 select LOCKUP_DETECTOR
1060 select LOCKUP_DETECTOR
1058 select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF
1061
1059 help
1060 Say Y here to enable the kernel to act as a watchdog to detect
1061 hard lockups.
1062
1063 Hardlockups are bugs that cause the CPU to loop in kernel mode
1064 for more than 10 seconds, without letting other interrupts have a
1065 chance to run. The current stack trace is displayed upon detection
1066 and the system will stay locked up.
1067
1062 help
1063 Say Y here to enable the kernel to act as a watchdog to detect
1064 hard lockups.
1065
1066 Hardlockups are bugs that cause the CPU to loop in kernel mode
1067 for more than 10 seconds, without letting other interrupts have a
1068 chance to run. The current stack trace is displayed upon detection
1069 and the system will stay locked up.
1070
1071#
1072# Note that arch-specific variants are always preferred.
1073#
1074config HARDLOCKUP_DETECTOR_PREFER_BUDDY
1075 bool "Prefer the buddy CPU hardlockup detector"
1076 depends on HARDLOCKUP_DETECTOR
1077 depends on HAVE_HARDLOCKUP_DETECTOR_PERF && HAVE_HARDLOCKUP_DETECTOR_BUDDY
1078 depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH
1079 help
1080 Say Y here to prefer the buddy hardlockup detector over the perf one.
1081
1082 With the buddy detector, each CPU uses its softlockup hrtimer
1083 to check that the next CPU is processing hrtimer interrupts by
1084 verifying that a counter is increasing.
1085
1086 This hardlockup detector is useful on systems that don't have
1087 an arch-specific hardlockup detector or if resources needed
1088 for the hardlockup detector are better used for other things.
1089
1090config HARDLOCKUP_DETECTOR_PERF
1091 bool
1092 depends on HARDLOCKUP_DETECTOR
1093 depends on HAVE_HARDLOCKUP_DETECTOR_PERF && !HARDLOCKUP_DETECTOR_PREFER_BUDDY
1094 depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH
1095 select HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
1096
1097config HARDLOCKUP_DETECTOR_BUDDY
1098 bool
1099 depends on HARDLOCKUP_DETECTOR
1100 depends on HAVE_HARDLOCKUP_DETECTOR_BUDDY
1101 depends on !HAVE_HARDLOCKUP_DETECTOR_PERF || HARDLOCKUP_DETECTOR_PREFER_BUDDY
1102 depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH
1103 select HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
1104
1105config HARDLOCKUP_DETECTOR_ARCH
1106 bool
1107 depends on HARDLOCKUP_DETECTOR
1108 depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
1109 help
1110 The arch-specific implementation of the hardlockup detector will
1111 be used.
1112
1113#
1114# Both the "perf" and "buddy" hardlockup detectors count hrtimer
1115# interrupts. This config enables functions managing this common code.
1116#
1117config HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
1118 bool
1119 select SOFTLOCKUP_DETECTOR
1120
1121#
1122# Enables a timestamp based low pass filter to compensate for perf based
1123# hard lockup detection which runs too fast due to turbo modes.
1124#
1125config HARDLOCKUP_CHECK_TIMESTAMP
1126 bool
1127
1068config BOOTPARAM_HARDLOCKUP_PANIC
1069 bool "Panic (Reboot) On Hard Lockups"
1070 depends on HARDLOCKUP_DETECTOR
1071 help
1072 Say Y here to enable the kernel to panic on "hard lockups",
1073 which are bugs that cause the kernel to loop in kernel
1074 mode with interrupts disabled for more than 10 seconds (configurable
1075 using the watchdog_thresh sysctl).

--- 53 unchanged lines hidden (view full) ---

1129 help
1130 Say Y here to enable stall detection on workqueues. If a
1131 worker pool doesn't make forward progress on a pending work
1132 item for over a given amount of time, 30s by default, a
1133 warning message is printed along with dump of workqueue
1134 state. This can be configured through kernel parameter
1135 "workqueue.watchdog_thresh" and its sysfs counterpart.
1136
1128config BOOTPARAM_HARDLOCKUP_PANIC
1129 bool "Panic (Reboot) On Hard Lockups"
1130 depends on HARDLOCKUP_DETECTOR
1131 help
1132 Say Y here to enable the kernel to panic on "hard lockups",
1133 which are bugs that cause the kernel to loop in kernel
1134 mode with interrupts disabled for more than 10 seconds (configurable
1135 using the watchdog_thresh sysctl).

--- 53 unchanged lines hidden (view full) ---

1189 help
1190 Say Y here to enable stall detection on workqueues. If a
1191 worker pool doesn't make forward progress on a pending work
1192 item for over a given amount of time, 30s by default, a
1193 warning message is printed along with dump of workqueue
1194 state. This can be configured through kernel parameter
1195 "workqueue.watchdog_thresh" and its sysfs counterpart.
1196
1197config WQ_CPU_INTENSIVE_REPORT
1198 bool "Report per-cpu work items which hog CPU for too long"
1199 depends on DEBUG_KERNEL
1200 help
1201 Say Y here to enable reporting of concurrency-managed per-cpu work
1202 items that hog CPUs for longer than
1203 workqueue.cpu_intensive_threshold_us. Workqueue automatically
1204 detects and excludes them from concurrency management to prevent
1205 them from stalling other per-cpu work items. Occassional
1206 triggering may not necessarily indicate a problem. Repeated
1207 triggering likely indicates that the work item should be switched
1208 to use an unbound workqueue.
1209
1137config TEST_LOCKUP
1138 tristate "Test module to generate lockups"
1139 depends on m
1140 help
1141 This builds the "test_lockup" module that helps to make sure
1142 that watchdogs and lockup detectors are working properly.
1143
1144 Depending on module parameters it could emulate soft or hard

--- 1152 unchanged lines hidden (view full) ---

2297
2298config TEST_UUID
2299 tristate "Test functions located in the uuid module at runtime"
2300
2301config TEST_XARRAY
2302 tristate "Test the XArray code at runtime"
2303
2304config TEST_MAPLE_TREE
1210config TEST_LOCKUP
1211 tristate "Test module to generate lockups"
1212 depends on m
1213 help
1214 This builds the "test_lockup" module that helps to make sure
1215 that watchdogs and lockup detectors are working properly.
1216
1217 Depending on module parameters it could emulate soft or hard

--- 1152 unchanged lines hidden (view full) ---

2370
2371config TEST_UUID
2372 tristate "Test functions located in the uuid module at runtime"
2373
2374config TEST_XARRAY
2375 tristate "Test the XArray code at runtime"
2376
2377config TEST_MAPLE_TREE
2305 depends on DEBUG_KERNEL
2306 select DEBUG_MAPLE_TREE
2307 tristate "Test the Maple Tree code at runtime"
2378 tristate "Test the Maple Tree code at runtime or module load"
2379 help
2380 Enable this option to test the maple tree code functions at boot, or
2381 when the module is loaded. Enable "Debug Maple Trees" will enable
2382 more verbose output on failures.
2308
2383
2384 If unsure, say N.
2385
2309config TEST_RHASHTABLE
2310 tristate "Perform selftest on resizable hash table"
2311 help
2312 Enable this option to test the rhashtable functions at boot.
2313
2314 If unsure, say N.
2315
2316config TEST_IDA

--- 131 unchanged lines hidden (view full) ---

2448 running the KUnit test harness, and not intended for inclusion into a
2449 production build.
2450
2451 For more information on KUnit and unit tests in general please refer
2452 to the KUnit documentation in Documentation/dev-tools/kunit/.
2453
2454 If unsure, say N.
2455
2386config TEST_RHASHTABLE
2387 tristate "Perform selftest on resizable hash table"
2388 help
2389 Enable this option to test the rhashtable functions at boot.
2390
2391 If unsure, say N.
2392
2393config TEST_IDA

--- 131 unchanged lines hidden (view full) ---

2525 running the KUnit test harness, and not intended for inclusion into a
2526 production build.
2527
2528 For more information on KUnit and unit tests in general please refer
2529 to the KUnit documentation in Documentation/dev-tools/kunit/.
2530
2531 If unsure, say N.
2532
2533config CHECKSUM_KUNIT
2534 tristate "KUnit test checksum functions at runtime" if !KUNIT_ALL_TESTS
2535 depends on KUNIT
2536 default KUNIT_ALL_TESTS
2537 help
2538 Enable this option to test the checksum functions at boot.
2539
2540 KUnit tests run during boot and output the results to the debug log
2541 in TAP format (http://testanything.org/). Only useful for kernel devs
2542 running the KUnit test harness, and not intended for inclusion into a
2543 production build.
2544
2545 For more information on KUnit and unit tests in general please refer
2546 to the KUnit documentation in Documentation/dev-tools/kunit/.
2547
2548 If unsure, say N.
2549
2456config HASH_KUNIT_TEST
2457 tristate "KUnit Test for integer hash functions" if !KUNIT_ALL_TESTS
2458 depends on KUNIT
2459 default KUNIT_ALL_TESTS
2460 help
2461 Enable this option to test the kernel's string (<linux/stringhash.h>), and
2462 integer (<linux/hash.h>) hash functions on boot.
2463

--- 193 unchanged lines hidden (view full) ---

2657 depends on HAVE_HW_BREAKPOINT
2658 depends on KUNIT=y
2659 default KUNIT_ALL_TESTS
2660 help
2661 Tests for hw_breakpoint constraints accounting.
2662
2663 If unsure, say N.
2664
2550config HASH_KUNIT_TEST
2551 tristate "KUnit Test for integer hash functions" if !KUNIT_ALL_TESTS
2552 depends on KUNIT
2553 default KUNIT_ALL_TESTS
2554 help
2555 Enable this option to test the kernel's string (<linux/stringhash.h>), and
2556 integer (<linux/hash.h>) hash functions on boot.
2557

--- 193 unchanged lines hidden (view full) ---

2751 depends on HAVE_HW_BREAKPOINT
2752 depends on KUNIT=y
2753 default KUNIT_ALL_TESTS
2754 help
2755 Tests for hw_breakpoint constraints accounting.
2756
2757 If unsure, say N.
2758
2759config STRCAT_KUNIT_TEST
2760 tristate "Test strcat() family of functions at runtime" if !KUNIT_ALL_TESTS
2761 depends on KUNIT
2762 default KUNIT_ALL_TESTS
2763
2665config STRSCPY_KUNIT_TEST
2666 tristate "Test strscpy*() family of functions at runtime" if !KUNIT_ALL_TESTS
2667 depends on KUNIT
2668 default KUNIT_ALL_TESTS
2669
2670config SIPHASH_KUNIT_TEST
2671 tristate "Perform selftest on siphash functions" if !KUNIT_ALL_TESTS
2672 depends on KUNIT

--- 233 unchanged lines hidden (view full) ---

2906
2907 This should not happen, thus by default the build is aborted. However,
2908 as an escape hatch, you can choose Y here to ignore them during build
2909 and let the check be carried at runtime (with `panic!` being called if
2910 the check fails).
2911
2912 If unsure, say N.
2913
2764config STRSCPY_KUNIT_TEST
2765 tristate "Test strscpy*() family of functions at runtime" if !KUNIT_ALL_TESTS
2766 depends on KUNIT
2767 default KUNIT_ALL_TESTS
2768
2769config SIPHASH_KUNIT_TEST
2770 tristate "Perform selftest on siphash functions" if !KUNIT_ALL_TESTS
2771 depends on KUNIT

--- 233 unchanged lines hidden (view full) ---

3005
3006 This should not happen, thus by default the build is aborted. However,
3007 as an escape hatch, you can choose Y here to ignore them during build
3008 and let the check be carried at runtime (with `panic!` being called if
3009 the check fails).
3010
3011 If unsure, say N.
3012
3013config RUST_KERNEL_DOCTESTS
3014 bool "Doctests for the `kernel` crate" if !KUNIT_ALL_TESTS
3015 depends on RUST && KUNIT=y
3016 default KUNIT_ALL_TESTS
3017 help
3018 This builds the documentation tests of the `kernel` crate
3019 as KUnit tests.
3020
3021 For more information on KUnit and unit tests in general,
3022 please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
3023
3024 If unsure, say N.
3025
2914endmenu # "Rust"
2915
2916endmenu # Kernel hacking
3026endmenu # "Rust"
3027
3028endmenu # Kernel hacking