From a75b17ef9140eb23f0b4503a7196eb4d579d4790 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Thu, 23 Jul 2015 16:48:51 +0800 Subject: [PATCH] watchdog: load iTCO_wdt early in cmdline hook We have added *wdt in kdump initramfs, but to improve it more we can do below (1) load wdt drivers as early as possible so that we can save time before wdt timeout some drivers like iTCO_wdt can stop the watchdog while driver initialization, so it can give more chance for kdump. It can save time especially in case some drivers take long time to init, like some storage and networking cards. (2) add only used wdt drivers in kdump initrd instead of add *wdt wdt driver layer need a change so that we can get the proper driver name from /dev/watchdog. Question to this is are we sure 1st kernel use /dev/watchdog instead of /dev/watchdog1? It need more investigation. (3) in case a driver can not stop (nowayout?) during module_init, we need load it as early as possible and kick the watchdog. Likely we can use systemd default watchdog functionality. This patch is about to address (1), and specially for iTCO_wdt, we only tested iTCO_wdt, thus in this patch only add this driver, need investigate on other drivers later to see if other drivers works in this way. Signed-off-by: Dave Young Signed-off-by: Baoquan He Acked-by: Minfei Huang --- dracut-module-setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index eeb348c..74d6fcd 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -666,7 +666,8 @@ install() { installkernel() { wdt=$(lsmod|cut -f1 -d' '|grep "wdt$") if [ -n "$wdt" ]; then - [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich + [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich && + echo "rd.driver.pre=lpc_ich,iTCO_wdt " >> ${initdir}/etc/cmdline.d/00-wdt.conf instmods $wdt fi }