* [PATCH V4 dracut 0/3] Install kernel module for active watchdog
@ 2016-03-08 8:44 Pratyush Anand
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 8:44 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: Pratyush Anand, Dave Young, Don Zickus, Harald Hoyer
Changes since V3:
-- Incorporated changes suggested by Harald for V2 patches
Changes since V2:
-- Added one more patch to update rd.driver.pre with watchdog module name,
so that they are loaded into kernel as early as possible.
-- Removed creation of tmp/active-watchdogs. modinfo will be helpful for
kexec-tools.
-- Now we add modules for active watchdog in hostonly mode and modules for
all watchdog in no-hostonly mode.
Changes since RFC:
-- Added one more patch to take care that dracut does not add watchdog
hooks when systemd module is included. In that case systemd daemon will
manage watchdog for kicking.
-- Removed --nowdt argument. User can use -o or --omit when wathdog module
is not needed. Thanks Harald for this suggestion.
-- Now I also do not check for "hostonly" to add modules for active
watchdog. It seems reasonable to add kernel watchdog modules whenever,
dracut watchdog module has been added.
Pratyush Anand (3):
watchdog: Do not add hooks if systemd module is included
watchdog: install module for active watchdog
watchdog: ensure that module is loaded as early as possible
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
modules.d/04watchdog/module-setup.sh | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
--
2.5.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V4 dracut 1/3] watchdog: Do not add hooks if systemd module is included
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-03-08 8:44 ` Pratyush Anand
2016-03-08 8:44 ` [PATCH V4 dracut 2/3] watchdog: install module for active watchdog Pratyush Anand
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 8:44 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: Pratyush Anand, Dave Young, Don Zickus, Harald Hoyer
When systemd is present, let it manage watchdog feed.
Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/04watchdog/module-setup.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
index 576c589c198d..7ec757aec032 100755
--- a/modules.d/04watchdog/module-setup.sh
+++ b/modules.d/04watchdog/module-setup.sh
@@ -12,6 +12,11 @@ depends() {
# called by dracut
install() {
+ # Do not add watchdog hooks if systemd module is included
+ # In that case, systemd will manage watchdog kick
+ if dracut_module_included "systemd"; then
+ return
+ fi
inst_hook cmdline 00 "$moddir/watchdog.sh"
inst_hook cmdline 50 "$moddir/watchdog.sh"
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
--
2.5.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 dracut 2/3] watchdog: install module for active watchdog
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 8:44 ` [PATCH V4 dracut 1/3] watchdog: Do not add hooks if systemd module is included Pratyush Anand
@ 2016-03-08 8:44 ` Pratyush Anand
[not found] ` <0c1909217f5714663d1fd1841c19b00dc68031b2.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 8:44 ` [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible Pratyush Anand
2016-03-08 9:34 ` [PATCH V4 dracut 0/3] Install kernel module for active watchdog Dave Young
3 siblings, 1 reply; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 8:44 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: Pratyush Anand, Dave Young, Don Zickus, Harald Hoyer
Recently following patches have been added in upstream Linux kernel, which
(1) fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
device attributes so that different watchdog status can be read.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b
With the above support, now we can find out whether a watchdog is active or
not. We can also find out the driver/module responsible for that watchdog
device.
Proposed patch uses above support and then adds module of active watchdog
in initramfs generated by dracut for hostonly mode. Kernel module for
inactive watchdog will be added as well for none hostonly mode.
When an user does not want to add kernel module, then one should exclude
complete dracut watchdog module with --omit.
Testing:
-- When watchdog is active watchdog modules were added
# cat /sys/class/watchdog/watchdog0/identity
iTCO_wdt
# cat /sys/class/watchdog/watchdog0/state
active
# dracut --hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO
-rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
-rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
-- When watchdog is inactive then watchdog modules were not added
# cat /sys/class/watchdog/watchdog0/state
inactive
# dracut --hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO
-- When watchdog is inactive, but no hostonly mode, watchdog modules were added
# cat /sys/class/watchdog/watchdog0/state
inactive
# dracut --no-hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO
-rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
-rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
index 7ec757aec032..0ffaa9658502 100755
--- a/modules.d/04watchdog/module-setup.sh
+++ b/modules.d/04watchdog/module-setup.sh
@@ -32,3 +32,31 @@ install() {
inst_multiple -o wdctl
}
+installkernel() {
+ [[ -d /sys/class/watchdog/ ]] || return
+ for dir in /sys/class/watchdog/*; do
+ [[ -d "$dir" ]] || continue
+ [[ -f "$dir/state" ]] || continue
+ active=$(< "$dir/state")
+ ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue
+ # device/modalias will return driver of this device
+ wdtdrv=$(< "$dir/device/modalias")
+ # There can be more than one module represented by same
+ # modalias. Currently load all of them.
+ # TODO: Need to find a way to avoid any unwanted module
+ # represented by modalias
+ wdtdrv=$(modprobe -R $wdtdrv)
+ instmods $wdtdrv
+ # however in some cases, we also need to check that if there is
+ # a specific driver for the parent bus/device. In such cases
+ # we also need to enable driver for parent bus/device.
+ wdtppath=$(readlink -f "$dir/device/..")
+ while [ -f "$wdtppath/modalias" ]
+ do
+ wdtpdrv=$(< "$wdtppath/modalias")
+ wdtpdrv=$(modprobe -R $wdtpdrv)
+ instmods $wdtpdrv
+ wdtppath=$(readlink -f "$wdtppath/..")
+ done
+ done
+}
--
2.5.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 8:44 ` [PATCH V4 dracut 1/3] watchdog: Do not add hooks if systemd module is included Pratyush Anand
2016-03-08 8:44 ` [PATCH V4 dracut 2/3] watchdog: install module for active watchdog Pratyush Anand
@ 2016-03-08 8:44 ` Pratyush Anand
[not found] ` <e63d322e2cc3081a616f14f5586998811145931d.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 9:34 ` [PATCH V4 dracut 0/3] Install kernel module for active watchdog Dave Young
3 siblings, 1 reply; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 8:44 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: Pratyush Anand, Dave Young, Don Zickus, Harald Hoyer
It is expected that a watchdog module will disable an active watchdog when
its probe is called ie, when it is loaded. So an early load of the module
will help to disable it earlier.
This can be helpful in some corner cases where kdump and watchdog daemon
both are active.
Testing:
-- When watchdog kernel modules were added
# dracut --no-hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img -f etc/cmdline.d/04-watchdog.conf
rd.driver.pre=iTCO_wdt,lpc_ich,
Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
modules.d/04watchdog/module-setup.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
index 0ffaa9658502..d99e5b33de44 100755
--- a/modules.d/04watchdog/module-setup.sh
+++ b/modules.d/04watchdog/module-setup.sh
@@ -34,6 +34,7 @@ install() {
installkernel() {
[[ -d /sys/class/watchdog/ ]] || return
+ wdtcmdline=""
for dir in /sys/class/watchdog/*; do
[[ -d "$dir" ]] || continue
[[ -f "$dir/state" ]] || continue
@@ -47,6 +48,7 @@ installkernel() {
# represented by modalias
wdtdrv=$(modprobe -R $wdtdrv)
instmods $wdtdrv
+ wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ","),"
# however in some cases, we also need to check that if there is
# a specific driver for the parent bus/device. In such cases
# we also need to enable driver for parent bus/device.
@@ -56,7 +58,10 @@ installkernel() {
wdtpdrv=$(< "$wdtppath/modalias")
wdtpdrv=$(modprobe -R $wdtpdrv)
instmods $wdtpdrv
+ wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ","),"
wdtppath=$(readlink -f "$wdtppath/..")
done
done
+ # ensure that watchdog module is loaded as early as possible
+ [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/04-watchdog.conf
}
--
2.5.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible
[not found] ` <e63d322e2cc3081a616f14f5586998811145931d.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-03-08 9:03 ` Dracut GitHub Import Bot
2016-03-08 9:37 ` Dave Young
1 sibling, 0 replies; 11+ messages in thread
From: Dracut GitHub Import Bot @ 2016-03-08 9:03 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Patchset imported to github.
Pull request:
<https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:e63d322e2cc3081a616f14f5586998811145931d.1457425628.git.panand%40redhat.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 2/3] watchdog: install module for active watchdog
[not found] ` <0c1909217f5714663d1fd1841c19b00dc68031b2.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-03-08 9:29 ` Dave Young
[not found] ` <20160308092912.GA8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Dave Young @ 2016-03-08 9:29 UTC (permalink / raw)
To: Pratyush Anand; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Harald Hoyer
Hi, Pratyush
On 03/08/16 at 02:14pm, Pratyush Anand wrote:
> Recently following patches have been added in upstream Linux kernel, which
> (1) fixes parent of watchdog_device so that
> /sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
> device attributes so that different watchdog status can be read.
>
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b
>
> With the above support, now we can find out whether a watchdog is active or
> not. We can also find out the driver/module responsible for that watchdog
> device.
>
> Proposed patch uses above support and then adds module of active watchdog
> in initramfs generated by dracut for hostonly mode. Kernel module for
> inactive watchdog will be added as well for none hostonly mode.
>
> When an user does not want to add kernel module, then one should exclude
> complete dracut watchdog module with --omit.
>
> Testing:
> -- When watchdog is active watchdog modules were added
> # cat /sys/class/watchdog/watchdog0/identity
> iTCO_wdt
> # cat /sys/class/watchdog/watchdog0/state
> active
> # dracut --hostonly initramfs-test.img -a watchdog
> # lsinitrd initramfs-test.img | grep iTCO
> -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
> -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
>
> -- When watchdog is inactive then watchdog modules were not added
> # cat /sys/class/watchdog/watchdog0/state
> inactive
> # dracut --hostonly initramfs-test.img -a watchdog
> # lsinitrd initramfs-test.img | grep iTCO
>
> -- When watchdog is inactive, but no hostonly mode, watchdog modules were added
> # cat /sys/class/watchdog/watchdog0/state
> inactive
> # dracut --no-hostonly initramfs-test.img -a watchdog
> # lsinitrd initramfs-test.img | grep iTCO
> -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
> -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
>
> Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
> index 7ec757aec032..0ffaa9658502 100755
> --- a/modules.d/04watchdog/module-setup.sh
> +++ b/modules.d/04watchdog/module-setup.sh
> @@ -32,3 +32,31 @@ install() {
> inst_multiple -o wdctl
> }
>
> +installkernel() {
> + [[ -d /sys/class/watchdog/ ]] || return
> + for dir in /sys/class/watchdog/*; do
> + [[ -d "$dir" ]] || continue
> + [[ -f "$dir/state" ]] || continue
> + active=$(< "$dir/state")
> + ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue
Even if for devices which is not active it is still a hostonly device because
it being detected by kernel running on the host?
But I will not stick to this issue, I'm fine if Harald is ok with it because I do
not know how to handle non hostonly in a proper way ..
Thanks
Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 0/3] Install kernel module for active watchdog
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2016-03-08 8:44 ` [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible Pratyush Anand
@ 2016-03-08 9:34 ` Dave Young
[not found] ` <20160308093400.GB8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
3 siblings, 1 reply; 11+ messages in thread
From: Dave Young @ 2016-03-08 9:34 UTC (permalink / raw)
To: Pratyush Anand; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Harald Hoyer
Hi, Pratyush
On 03/08/16 at 02:14pm, Pratyush Anand wrote:
> Changes since V3:
> -- Incorporated changes suggested by Harald for V2 patches
>
> Changes since V2:
> -- Added one more patch to update rd.driver.pre with watchdog module name,
> so that they are loaded into kernel as early as possible.
> -- Removed creation of tmp/active-watchdogs. modinfo will be helpful for
> kexec-tools.
Kdump still need save a previous added wdt somewhere so that it can rebuild
initrd if necessary. I'm not sure where can we store the state, do you have
some thoughts about it?
Thanks
Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible
[not found] ` <e63d322e2cc3081a616f14f5586998811145931d.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 9:03 ` Dracut GitHub Import Bot
@ 2016-03-08 9:37 ` Dave Young
[not found] ` <20160308093738.GC8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
1 sibling, 1 reply; 11+ messages in thread
From: Dave Young @ 2016-03-08 9:37 UTC (permalink / raw)
To: Pratyush Anand; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Harald Hoyer
Hi, Pratyush
On 03/08/16 at 02:14pm, Pratyush Anand wrote:
> It is expected that a watchdog module will disable an active watchdog when
> its probe is called ie, when it is loaded. So an early load of the module
> will help to disable it earlier.
> This can be helpful in some corner cases where kdump and watchdog daemon
> both are active.
>
> Testing:
> -- When watchdog kernel modules were added
> # dracut --no-hostonly initramfs-test.img -a watchdog
> # lsinitrd initramfs-test.img -f etc/cmdline.d/04-watchdog.conf
> rd.driver.pre=iTCO_wdt,lpc_ich,
>
> Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/04watchdog/module-setup.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
> index 0ffaa9658502..d99e5b33de44 100755
> --- a/modules.d/04watchdog/module-setup.sh
> +++ b/modules.d/04watchdog/module-setup.sh
> @@ -34,6 +34,7 @@ install() {
>
> installkernel() {
> [[ -d /sys/class/watchdog/ ]] || return
> + wdtcmdline=""
> for dir in /sys/class/watchdog/*; do
> [[ -d "$dir" ]] || continue
> [[ -f "$dir/state" ]] || continue
> @@ -47,6 +48,7 @@ installkernel() {
> # represented by modalias
> wdtdrv=$(modprobe -R $wdtdrv)
> instmods $wdtdrv
> + wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ","),"
> # however in some cases, we also need to check that if there is
> # a specific driver for the parent bus/device. In such cases
> # we also need to enable driver for parent bus/device.
> @@ -56,7 +58,10 @@ installkernel() {
> wdtpdrv=$(< "$wdtppath/modalias")
> wdtpdrv=$(modprobe -R $wdtpdrv)
> instmods $wdtpdrv
> + wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ","),"
> wdtppath=$(readlink -f "$wdtppath/..")
> done
> done
> + # ensure that watchdog module is loaded as early as possible
> + [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/04-watchdog.conf
It is not necessary to use same number as the dracut module "04".
Since it is special we want it being loaded as soon as possible move it to 00-watchdog.conf sound better.
Thanks
Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible
[not found] ` <20160308093738.GC8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2016-03-08 10:27 ` Pratyush Anand
0 siblings, 0 replies; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 10:27 UTC (permalink / raw)
To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Harald Hoyer
Hi Dave,
On 08/03/2016:05:37:38 PM, Dave Young wrote:
> > + [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/04-watchdog.conf
>
> It is not necessary to use same number as the dracut module "04".
> Since it is special we want it being loaded as soon as possible move it to 00-watchdog.conf sound better.
OK. Will change.
~Pratyush
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 0/3] Install kernel module for active watchdog
[not found] ` <20160308093400.GB8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2016-03-08 10:32 ` Pratyush Anand
0 siblings, 0 replies; 11+ messages in thread
From: Pratyush Anand @ 2016-03-08 10:32 UTC (permalink / raw)
To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Harald Hoyer
Hi Dave,
On 08/03/2016:05:34:00 PM, Dave Young wrote:
> On 03/08/16 at 02:14pm, Pratyush Anand wrote:
> > -- Removed creation of tmp/active-watchdogs. modinfo will be helpful for
> > kexec-tools.
>
> Kdump still need save a previous added wdt somewhere so that it can rebuild
> initrd if necessary. I'm not sure where can we store the state, do you have
> some thoughts about it?
modinfo is able to help out here. See following kexec implementation, which I
still need to cleanup (as per coding style feedback received for dracut
patches), But I have tested it and it works.
https://github.com/pratyushanand/kexec-tools/blob/watchdog_fmaster/kdumpctl#L341
~Pratyush
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 dracut 2/3] watchdog: install module for active watchdog
[not found] ` <20160308092912.GA8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2016-03-11 3:46 ` Pratyush Anand
0 siblings, 0 replies; 11+ messages in thread
From: Pratyush Anand @ 2016-03-11 3:46 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Don Zickus, Dave Young
Hi Harald,
On 08/03/2016:05:29:12 PM, Dave Young wrote:
> On 03/08/16 at 02:14pm, Pratyush Anand wrote:
> > + active=$(< "$dir/state")
> > + ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue
>
> Even if for devices which is not active it is still a hostonly device because
> it being detected by kernel running on the host?
>
> But I will not stick to this issue, I'm fine if Harald is ok with it because I do
> not know how to handle non hostonly in a proper way ..
Please let me know if you have any further input for these patches. Otherwise, I
will send a V5 with the update in patch 3/3 incorporating Dave's comment for
change in Watchdog command line file name.
~Pratyush
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-03-11 3:46 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 8:44 [PATCH V4 dracut 0/3] Install kernel module for active watchdog Pratyush Anand
[not found] ` <cover.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 8:44 ` [PATCH V4 dracut 1/3] watchdog: Do not add hooks if systemd module is included Pratyush Anand
2016-03-08 8:44 ` [PATCH V4 dracut 2/3] watchdog: install module for active watchdog Pratyush Anand
[not found] ` <0c1909217f5714663d1fd1841c19b00dc68031b2.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 9:29 ` Dave Young
[not found] ` <20160308092912.GA8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-11 3:46 ` Pratyush Anand
2016-03-08 8:44 ` [PATCH V4 dracut 3/3] watchdog: ensure that module is loaded as early as possible Pratyush Anand
[not found] ` <e63d322e2cc3081a616f14f5586998811145931d.1457425628.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08 9:03 ` Dracut GitHub Import Bot
2016-03-08 9:37 ` Dave Young
[not found] ` <20160308093738.GC8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-08 10:27 ` Pratyush Anand
2016-03-08 9:34 ` [PATCH V4 dracut 0/3] Install kernel module for active watchdog Dave Young
[not found] ` <20160308093400.GB8155-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-08 10:32 ` Pratyush Anand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).