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 <dyoung@redhat.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Minfei Huang <mhuang@redhat.com>
This commit is contained in:
Dave Young 2015-07-23 16:48:51 +08:00
parent 970cb6124f
commit a75b17ef91
1 changed files with 2 additions and 1 deletions

View File

@ -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
}