Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646980 > unrolled thread

[PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

Started byRasmus Villemoes <rasmus.villemoes@prevas.dk>
First post2017-05-22 16:30 +0200
Last post2017-06-06 15:50 +0200
Articles 11 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-22 16:30 +0200
    Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening  /dev/watchdogN Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-22 20:10 +0200
      Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening  /dev/watchdogN Guenter Roeck <linux@roeck-us.net> - 2017-05-22 21:50 +0200
      Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening  /dev/watchdogN Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-23 09:30 +0200
    Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN Esben Haabendal <esben.haabendal@gmail.com> - 2017-05-24 16:30 +0200
    [PATCH v6 1/3] watchdog: introduce watchdog_worker_should_ping helper Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-30 11:00 +0200
    [PATCH v6 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-30 11:00 +0200
    [PATCH v6 2/3] watchdog: introduce watchdog.open_timeout commandline parameter Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-30 11:00 +0200
    [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-05-30 11:00 +0200
      Re: [PATCH v6 0/3] watchdog: allow setting deadline for opening  /dev/watchdogN Rasmus Villemoes <rasmus.villemoes@prevas.dk> - 2017-06-06 10:30 +0200
        Re: [PATCH v6 0/3] watchdog: allow setting deadline for opening  /dev/watchdogN Guenter Roeck <linux@roeck-us.net> - 2017-06-06 15:50 +0200

#1646980 — [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-22 16:30 +0200
Subject[PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tJWlH-6KH-3@gated-at.bofh.it>
If a watchdog driver tells the framework that the device is running,
the framework takes care of feeding the watchdog until userspace opens
the device. If the userspace application which is supposed to do that
never comes up properly, the watchdog is fed indefinitely by the
kernel. This can be especially problematic for embedded devices.

These patches allow one to set a maximum time for which the kernel
will feed the watchdog, thus ensuring that either userspace has come
up, or the board gets reset. This allows fallback logic in the
bootloader to attempt some recovery (for example, if an automatic
update is in progress, it could roll back to the previous version).

The patches have been tested on a Raspberry Pi 2 and a Wandboard.

v5 is identical to v4 posted in January, just rebased to current
master (v4.12-rc2).

v4 is mostly identical to v1. The differences are that the ability to
compile out this feature is removed, and the ability to set the
default value for the watchdog.open_timeout command line parameter via
Kconfig is split into a separate patch.

Compared to v2/v3, this drops the ability to set the open_timeout via
a device property; I'll leave implementing that to those who actually
need it.

Rasmus Villemoes (3):
  watchdog: introduce watchdog_worker_should_ping helper
  watchdog: introduce watchdog.open_timeout commandline parameter
  watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

 Documentation/watchdog/watchdog-parameters.txt | 10 +++++++
 drivers/watchdog/Kconfig                       |  9 +++++++
 drivers/watchdog/watchdog_dev.c                | 37 +++++++++++++++++++++++---
 3 files changed, 52 insertions(+), 4 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1647231 — Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromAlan Cox <gnomes@lxorguk.ukuu.org.uk>
Date2017-05-22 20:10 +0200
SubjectRe: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tJZWi-z3-7@gated-at.bofh.it>
In reply to#1646980
On Mon, 22 May 2017 16:06:36 +0200
Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote:

> If a watchdog driver tells the framework that the device is running,
> the framework takes care of feeding the watchdog until userspace opens
> the device. If the userspace application which is supposed to do that
> never comes up properly, the watchdog is fed indefinitely by the
> kernel. This can be especially problematic for embedded devices.
> 
> These patches allow one to set a maximum time for which the kernel
> will feed the watchdog, thus ensuring that either userspace has come
> up, or the board gets reset. This allows fallback logic in the
> bootloader to attempt some recovery (for example, if an automatic
> update is in progress, it could roll back to the previous version).


This makes sense except for being a CONFIG_ option not a boot parameter.
If it's a boot parameter then the same kernel works for multiple systems
and is general. If it's compile time then you have to build a custom
kernel.

For some embedded stuff that might not matter (although I bet they'd
prefer it command line/device tree too) but for something like an x86
platform where you are deploying a standard vendor supplied kernel it's
bad to do it that way IMHO.

In other words I think you should drop patch 3 but the rest is good.

Alan

[toc] | [prev] | [next] | [standalone]


#1647311 — Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromGuenter Roeck <linux@roeck-us.net>
Date2017-05-22 21:50 +0200
SubjectRe: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tK1v4-1nY-27@gated-at.bofh.it>
In reply to#1647231
On Mon, May 22, 2017 at 07:07:51PM +0100, Alan Cox wrote:
> On Mon, 22 May 2017 16:06:36 +0200
> Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote:
> 
> > If a watchdog driver tells the framework that the device is running,
> > the framework takes care of feeding the watchdog until userspace opens
> > the device. If the userspace application which is supposed to do that
> > never comes up properly, the watchdog is fed indefinitely by the
> > kernel. This can be especially problematic for embedded devices.
> > 
> > These patches allow one to set a maximum time for which the kernel
> > will feed the watchdog, thus ensuring that either userspace has come
> > up, or the board gets reset. This allows fallback logic in the
> > bootloader to attempt some recovery (for example, if an automatic
> > update is in progress, it could roll back to the previous version).
> 
> 
> This makes sense except for being a CONFIG_ option not a boot parameter.
> If it's a boot parameter then the same kernel works for multiple systems
> and is general. If it's compile time then you have to build a custom
> kernel.
> 
> For some embedded stuff that might not matter (although I bet they'd
> prefer it command line/device tree too) but for something like an x86
> platform where you are deploying a standard vendor supplied kernel it's
> bad to do it that way IMHO.
> 
> In other words I think you should drop patch 3 but the rest is good.
> 

Same here. Can we assume a formal Reviewed-by: from you for the first two
patches ?

Thanks,
Guenter

> Alan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1647724 — Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-23 09:30 +0200
SubjectRe: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tKcqv-8q9-23@gated-at.bofh.it>
In reply to#1647231
On 2017-05-22 20:07, Alan Cox wrote:
> On Mon, 22 May 2017 16:06:36 +0200
> Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote:
> 
>> If a watchdog driver tells the framework that the device is running,
>> the framework takes care of feeding the watchdog until userspace opens
>> the device. If the userspace application which is supposed to do that
>> never comes up properly, the watchdog is fed indefinitely by the
>> kernel. This can be especially problematic for embedded devices.
>>
>> These patches allow one to set a maximum time for which the kernel
>> will feed the watchdog, thus ensuring that either userspace has come
>> up, or the board gets reset. This allows fallback logic in the
>> bootloader to attempt some recovery (for example, if an automatic
>> update is in progress, it could roll back to the previous version).
> 
> 
> This makes sense except for being a CONFIG_ option not a boot parameter.
> If it's a boot parameter then the same kernel works for multiple systems
> and is general. If it's compile time then you have to build a custom
> kernel.

I don't understand. Patch 3 simply allows the default to be set in the
config, but it is very much still possible to set it via the boot
command line, overriding the default (whether that was a CONFIG or a
hardcoded 0).

> For some embedded stuff that might not matter (although I bet they'd
> prefer it command line/device tree too)

When building a full BSP, yes, one can cook it into the boot command
line in u-boot, but that means that to update it one has to edit one's
u-boot recipe. It also often makes testing-turnaround times longer,
since updating the kernel can often be done by just scp'ing a new image
to the board, while updating the bootloader is sometimes a much more
involved procedure (not to mention that that's sometimes not even
possible to do remotely). There's also the issue of the command line
getting rather crowded if every aspect of the kernel has to be
configured at boot time.

As an embedded developer, I'm all for being able to override this
timeout as well lots of other kernel behavior via the command line, but
at the same time, I also prefer being able to set the default values in
the kernel's .config.

 but for something like an x86
> platform where you are deploying a standard vendor supplied kernel it's
> bad to do it that way IMHO.

A "standard vendor supplied kernel" will never set that CONFIG to
anything but its default - how could it possibly decide how long
userspace should have to open /dev/watchdog0, or even if userspace will
ever do that? Again, patch 3 doesn't in any way remove the possiblity of
setting this on the command line, and the end user is no worse off just
because the vendor had to keep a default setting.

> In other words I think you should drop patch 3 but the rest is good.

For the life of me, I cannot see the downside of patch 3, or how it's
any different from CONSOLE_LOGLEVEL_DEFAULT, BLK_DEV_RAM_SIZE, or any
number of other parameters-with-defaults-from-Kconfig.

Rasmus

[toc] | [prev] | [next] | [standalone]


#1649664

FromEsben Haabendal <esben.haabendal@gmail.com>
Date2017-05-24 16:30 +0200
Message-ID<tKFsu-3ss-29@gated-at.bofh.it>
In reply to#1646980
On 22 May 2017 at 16:06, Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote:
>
> Rasmus Villemoes (3):
>   watchdog: introduce watchdog_worker_should_ping helper
>   watchdog: introduce watchdog.open_timeout commandline parameter
>   watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
>
>  Documentation/watchdog/watchdog-parameters.txt | 10 +++++++
>  drivers/watchdog/Kconfig                       |  9 +++++++
>  drivers/watchdog/watchdog_dev.c                | 37 +++++++++++++++++++++++---
>  3 files changed, 52 insertions(+), 4 deletions(-)


Thanks. This is definitely useful for embedded applications.

If this get merged, it should be able to replace several out-of-tree
hacks to accomplish the same thing.

For all 3 patches:
Reviewed-by: Esben Haabendal <esben@haabendal.dk>

/Esben

[toc] | [prev] | [next] | [standalone]


#1652961 — [PATCH v6 1/3] watchdog: introduce watchdog_worker_should_ping helper

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-30 11:00 +0200
Subject[PATCH v6 1/3] watchdog: introduce watchdog_worker_should_ping helper
Message-ID<tMLaq-54b-11@gated-at.bofh.it>
In reply to#1646980
This will be useful when the condition becomes slightly more
complicated in the next patch.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Esben Haabendal <esben@haabendal.dk>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/watchdog/watchdog_dev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index d5d2bbd..caa4b90 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -192,18 +192,23 @@ static int watchdog_ping(struct watchdog_device *wdd)
 	return __watchdog_ping(wdd);
 }
 
+static bool watchdog_worker_should_ping(struct watchdog_core_data *wd_data)
+{
+	struct watchdog_device *wdd = wd_data->wdd;
+
+	return wdd && (watchdog_active(wdd) || watchdog_hw_running(wdd));
+}
+
 static void watchdog_ping_work(struct work_struct *work)
 {
 	struct watchdog_core_data *wd_data;
-	struct watchdog_device *wdd;
 
 	wd_data = container_of(to_delayed_work(work), struct watchdog_core_data,
 			       work);
 
 	mutex_lock(&wd_data->lock);
-	wdd = wd_data->wdd;
-	if (wdd && (watchdog_active(wdd) || watchdog_hw_running(wdd)))
-		__watchdog_ping(wdd);
+	if (watchdog_worker_should_ping(wd_data))
+		__watchdog_ping(wd_data->wdd);
 	mutex_unlock(&wd_data->lock);
 }
 
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1652964 — [PATCH v6 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-30 11:00 +0200
Subject[PATCH v6 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
Message-ID<tMLar-54b-23@gated-at.bofh.it>
In reply to#1646980
This allows setting a default value for the watchdog.open_timeout
commandline parameter via Kconfig.

Some BSPs allow remote updating of the kernel image and root file
system, but updating the bootloader requires physical access. Hence, if
one has a firmware update that requires relaxing the
watchdog.open_timeout a little, the value used must be baked into the
kernel image itself and cannot come from the u-boot environment via the
kernel command line.

Being able to set the initial value in .config doesn't change the fact
that the value on the command line, if present, takes precedence, and is
of course immensely useful for development purposes while one has
console acccess, as well as usable in the cases where one can make a
permanent update of the kernel command line.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 Documentation/watchdog/watchdog-parameters.txt | 3 ++-
 drivers/watchdog/Kconfig                       | 9 +++++++++
 drivers/watchdog/watchdog_dev.c                | 2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 8577c27..fa34625 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -11,7 +11,8 @@ modules.
 The watchdog core parameter watchdog.open_timeout is the maximum time,
 in milliseconds, for which the watchdog framework will take care of
 pinging a hardware watchdog until userspace opens the corresponding
-/dev/watchdogN device. A value of 0 (the default) means an infinite
+/dev/watchdogN device. The defalt value is
+CONFIG_WATCHDOG_OPEN_TIMEOUT. A value of 0 means an infinite
 timeout. Setting this to a non-zero value can be useful to ensure that
 either userspace comes up properly, or the board gets reset and allows
 fallback logic in the bootloader to try something else.
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 8b9049d..11946fb 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -52,6 +52,15 @@ config WATCHDOG_SYSFS
 	  Say Y here if you want to enable watchdog device status read through
 	  sysfs attributes.
 
+config WATCHDOG_OPEN_TIMEOUT
+	int "Timeout value for opening watchdog device"
+	default 0
+	help
+	  The maximum time, in milliseconds, for which the watchdog
+	  framework takes care of pinging a hardware watchdog. A value
+	  of 0 means infinite. The value set here can be overridden by
+	  the commandline parameter "watchdog.open_timeout".
+
 #
 # General Watchdog drivers
 #
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index c807067..098b9cb 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -81,7 +81,7 @@ static struct watchdog_core_data *old_wd_data;
 
 static struct workqueue_struct *watchdog_wq;
 
-static unsigned open_timeout;
+static unsigned open_timeout = CONFIG_WATCHDOG_OPEN_TIMEOUT;
 module_param(open_timeout, uint, 0644);
 
 static bool watchdog_past_open_deadline(struct watchdog_core_data *data)
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1652968 — [PATCH v6 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-30 11:00 +0200
Subject[PATCH v6 2/3] watchdog: introduce watchdog.open_timeout commandline parameter
Message-ID<tMLar-54b-41@gated-at.bofh.it>
In reply to#1646980
The watchdog framework takes care of feeding a hardware watchdog until
userspace opens /dev/watchdogN. If that never happens for some reason
(buggy init script, corrupt root filesystem or whatnot) but the kernel
itself is fine, the machine stays up indefinitely. This patch allows
setting an upper limit for how long the kernel will take care of the
watchdog, thus ensuring that the watchdog will eventually reset the
machine.

This is particularly useful for embedded devices where some fallback
logic is implemented in the bootloader (e.g., use a different root
partition, boot from network, ...).

The open timeout is also used as a maximum time for an application to
re-open /dev/watchdogN after closing it.

A value of 0 (the default) means infinite timeout, preserving the
current behaviour.

The unit is milliseconds rather than seconds because that covers more
use cases. For example, one can effectively disable the kernel handling
by setting the open_timeout to 1 ms. There are also customers with very
strict requirements that may want to set the open_timeout to something
like 4500 ms, which combined with a hardware watchdog that must be
pinged every 250 ms ensures userspace is up no more than 5 seconds after
the bootloader hands control to the kernel (250 ms until the driver gets
registered and kernel handling starts, 4500 ms of kernel handling, and
then up to 250 ms from the last ping until userspace takes over).

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 Documentation/watchdog/watchdog-parameters.txt |  8 ++++++++
 drivers/watchdog/watchdog_dev.c                | 26 +++++++++++++++++++++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 914518a..8577c27 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -8,6 +8,14 @@ See Documentation/admin-guide/kernel-parameters.rst for information on
 providing kernel parameters for builtin drivers versus loadable
 modules.
 
+The watchdog core parameter watchdog.open_timeout is the maximum time,
+in milliseconds, for which the watchdog framework will take care of
+pinging a hardware watchdog until userspace opens the corresponding
+/dev/watchdogN device. A value of 0 (the default) means an infinite
+timeout. Setting this to a non-zero value can be useful to ensure that
+either userspace comes up properly, or the board gets reset and allows
+fallback logic in the bootloader to try something else.
+
 
 -------------------------------------------------
 acquirewdt:
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index caa4b90..c807067 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -66,6 +66,7 @@ struct watchdog_core_data {
 	struct mutex lock;
 	unsigned long last_keepalive;
 	unsigned long last_hw_keepalive;
+	unsigned long open_deadline;
 	struct delayed_work work;
 	unsigned long status;		/* Internal status bits */
 #define _WDOG_DEV_OPEN		0	/* Opened ? */
@@ -80,6 +81,21 @@ static struct watchdog_core_data *old_wd_data;
 
 static struct workqueue_struct *watchdog_wq;
 
+static unsigned open_timeout;
+module_param(open_timeout, uint, 0644);
+
+static bool watchdog_past_open_deadline(struct watchdog_core_data *data)
+{
+	if (!open_timeout)
+		return false;
+	return time_is_before_jiffies(data->open_deadline);
+}
+
+static void watchdog_set_open_deadline(struct watchdog_core_data *data)
+{
+	data->open_deadline = jiffies + msecs_to_jiffies(open_timeout);
+}
+
 static inline bool watchdog_need_worker(struct watchdog_device *wdd)
 {
 	/* All variables in milli-seconds */
@@ -196,7 +212,13 @@ static bool watchdog_worker_should_ping(struct watchdog_core_data *wd_data)
 {
 	struct watchdog_device *wdd = wd_data->wdd;
 
-	return wdd && (watchdog_active(wdd) || watchdog_hw_running(wdd));
+	if (!wdd)
+		return false;
+
+	if (watchdog_active(wdd))
+		return true;
+
+	return watchdog_hw_running(wdd) && !watchdog_past_open_deadline(wd_data);
 }
 
 static void watchdog_ping_work(struct work_struct *work)
@@ -857,6 +879,7 @@ static int watchdog_release(struct inode *inode, struct file *file)
 		watchdog_ping(wdd);
 	}
 
+	watchdog_set_open_deadline(wd_data);
 	watchdog_update_worker(wdd);
 
 	/* make sure that /dev/watchdog can be re-opened */
@@ -955,6 +978,7 @@ static int watchdog_cdev_register(struct watchdog_device *wdd, dev_t devno)
 
 	/* Record time of most recent heartbeat as 'just before now'. */
 	wd_data->last_hw_keepalive = jiffies - 1;
+	watchdog_set_open_deadline(wd_data);
 
 	/*
 	 * If the watchdog is running, prevent its driver from being unloaded,
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1652974 — [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-05-30 11:00 +0200
Subject[PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tMLaq-54b-13@gated-at.bofh.it>
In reply to#1646980
If a watchdog driver tells the framework that the device is running,
the framework takes care of feeding the watchdog until userspace opens
the device. If the userspace application which is supposed to do that
never comes up properly, the watchdog is fed indefinitely by the
kernel. This can be especially problematic for embedded devices.

These patches allow one to set a maximum time for which the kernel
will feed the watchdog, thus ensuring that either userspace has come
up, or the board gets reset. This allows fallback logic in the
bootloader to attempt some recovery (for example, if an automatic
update is in progress, it could roll back to the previous version).

The patches have been tested on a Raspberry Pi 2 and a Wandboard.

v6 tweaks the wording in watchdog-parameters.txt to avoid having to
update it if and when the watchdog core grows new parameters. It also
adds a little more rationale to the commit messages for 2/3 and 3/3,
and adds Reviewed-bys to 1/3 which is unchanged from v5.

v5 is identical to v4 posted in January, just rebased to current
master (v4.12-rc2).

v4 is mostly identical to v1. The differences are that the ability to
compile out this feature is removed, and the ability to set the
default value for the watchdog.open_timeout command line parameter via
Kconfig is split into a separate patch.

Compared to v2/v3, this drops the ability to set the open_timeout via
a device property; I'll leave implementing that to those who actually
need it.

Rasmus Villemoes (3):
  watchdog: introduce watchdog_worker_should_ping helper
  watchdog: introduce watchdog.open_timeout commandline parameter
  watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

 Documentation/watchdog/watchdog-parameters.txt |  9 +++++++
 drivers/watchdog/Kconfig                       |  9 +++++++
 drivers/watchdog/watchdog_dev.c                | 37 +++++++++++++++++++++++---
 3 files changed, 51 insertions(+), 4 deletions(-)

-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1658476 — Re: [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromRasmus Villemoes <rasmus.villemoes@prevas.dk>
Date2017-06-06 10:30 +0200
SubjectRe: [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tPi2e-6eW-17@gated-at.bofh.it>
In reply to#1652974
On 2017-05-30 10:56, Rasmus Villemoes wrote:
> 
> v6 tweaks the wording in watchdog-parameters.txt to avoid having to
> update it if and when the watchdog core grows new parameters. It also
> adds a little more rationale to the commit messages for 2/3 and 3/3,
> and adds Reviewed-bys to 1/3 which is unchanged from v5.

Ping. Guenther, is there anything I can do on my end to get this in
before the 4.13 merge window opens? I realize you're busy, but I'd
really appreciate just a brief response to this and the other emails
I've sent the past few weeks.


-- 
Rasmus Villemoes
Software Developer
Prevas A/S
Hedeager 1
DK-8200 Aarhus N
+45 51210274
rasmus.villemoes@prevas.dk
www.prevas.dk

[toc] | [prev] | [next] | [standalone]


#1658777 — Re: [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

FromGuenter Roeck <linux@roeck-us.net>
Date2017-06-06 15:50 +0200
SubjectRe: [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN
Message-ID<tPn1U-12m-13@gated-at.bofh.it>
In reply to#1658476
On 06/06/2017 01:08 AM, Rasmus Villemoes wrote:
> On 2017-05-30 10:56, Rasmus Villemoes wrote:
>>
>> v6 tweaks the wording in watchdog-parameters.txt to avoid having to
>> update it if and when the watchdog core grows new parameters. It also
>> adds a little more rationale to the commit messages for 2/3 and 3/3,
>> and adds Reviewed-bys to 1/3 which is unchanged from v5.
> 
> Ping. Guenther, is there anything I can do on my end to get this in
> before the 4.13 merge window opens? I realize you're busy, but I'd
> really appreciate just a brief response to this and the other emails
> I've sent the past few weeks.
> 
> 

You made a suggestion that this overlaps with another option, which forces me
to go back and check the entire exchange from the start, for which I did not
have time yet, sorry.

Guenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web