diff options
| author | Randy Dunlap <[email protected]> | 2007-10-16 01:23:46 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-10-16 09:42:49 -0700 |
| commit | bfe8df3d314bddf30758bd738e0087e80964760c (patch) | |
| tree | d04db4fb2592e2d416073681903f05f5b30f204b /include/linux | |
| parent | 1bcf548293aef19b0797348332cf1dfbf2116cef (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.
[[email protected]: not all architectures implement CONFIG_HZ]
[[email protected]: fix lots of stuff]
[[email protected]: kernel/printk.c: make 2 variables static]
[[email protected]: fix slow down printk on boot compile error]
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Dave Jones <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/jiffies.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index e757a74b9d17..8b080024bbc1 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -148,6 +148,8 @@ static inline u64 get_jiffies_64(void) */ #define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1) +extern unsigned long preset_lpj; + /* * We want to do realistic conversions of time so we need to use the same * values the update wall clock code uses as the jiffies size. This value |