Re: slow down printk during boot.

From: Jeff Garzik
Date: Thu Jul 05 2007 - 20:49:27 EST


Dave Jones wrote:
This patch from Randy has proven quite useful from time to time,
and has been in Fedora kernels for a while for that reason.
I fixed up some checkpatch warnings, and rediffed it a bunch
of times, Randy did the heavy lifting.

---

This one delays each printk() during boot by a variable time
(from kernel command line), while system_state == SYSTEM_BOOTING.
Caveat: it's not terribly SMP safe or SMP nice.
Any ideas for improvements (esp. in the SMP area) are appreciated.

---

From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

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_DELAY=y and then add (e.g.):
"lpj=loops_per_jiffy boot_delay=100"
to the kernel command line.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Dave Jones <davej@xxxxxxxxxx>

---

init/calibrate.c | 2 +-
init/main.c | 25 +++++++++++++++++++++++++
kernel/printk.c | 33 +++++++++++++++++++++++++++++++++
lib/Kconfig.debug | 18 ++++++++++++++++++
4 files changed, 77 insertions(+), 1 deletion(-)

hey, that's pretty neat.

I've occasionally hand-hacked something similar, to achieve those effects.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/