aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2007-10-16 04:23:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:49 -0400
commitbfe8df3d314bddf30758bd738e0087e80964760c (patch)
treed04db4fb2592e2d416073681903f05f5b30f204b /lib/Kconfig.debug
parent1bcf548293aef19b0797348332cf1dfbf2116cef (diff)
slow down printk during boot
Optionally add a boot delay after each kernel printk() call, crudely measured in milliseconds, with a maximum delay of 10 seconds per printk. Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.): "lpj=loops_per_jiffy boot_delay=100" to the kernel command line. It has been useful in cases like "during boot, my machine just reboots or the screen goes black" by slowing down printk, (and adding initcall_debug), we can usually see the last thing that happened before the lights went out which is usually a valuable clue. [akpm@linux-foundation.org: not all architectures implement CONFIG_HZ] [akpm@linux-foundation.org: fix lots of stuff] [bunk@stusta.de: kernel/printk.c: make 2 variables static] [heiko.carstens@de.ibm.com: fix slow down printk on boot compile error] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 396c38b3cb69..7d16e6433302 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -413,6 +413,24 @@ config FORCED_INLINING
413 become the default in the future, until then this option is there to 413 become the default in the future, until then this option is there to
414 test gcc for this. 414 test gcc for this.
415 415
416config BOOT_PRINTK_DELAY
417 bool "Delay each boot printk message by N milliseconds"
418 depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
419 help
420 This build option allows you to read kernel boot messages
421 by inserting a short delay after each one. The delay is
422 specified in milliseconds on the kernel command line,
423 using "boot_delay=N".
424
425 It is likely that you would also need to use "lpj=M" to preset
426 the "loops per jiffie" value.
427 See a previous boot log for the "lpj" value to use for your
428 system, and then set "lpj=M" before setting "boot_delay=N".
429 NOTE: Using this option may adversely affect SMP systems.
430 I.e., processors other than the first one may not boot up.
431 BOOT_PRINTK_DELAY also may cause DETECT_SOFTLOCKUP to detect
432 what it believes to be lockup conditions.
433
416config RCU_TORTURE_TEST 434config RCU_TORTURE_TEST
417 tristate "torture tests for RCU" 435 tristate "torture tests for RCU"
418 depends on DEBUG_KERNEL 436 depends on DEBUG_KERNEL