* [Xenomai-core] Make watchdog-timer configurable
@ 2007-09-04 13:12 Johan Borkhuis
2007-09-04 13:54 ` Philippe Gerum
2007-09-07 7:40 ` Philippe Gerum
0 siblings, 2 replies; 5+ messages in thread
From: Johan Borkhuis @ 2007-09-04 13:12 UTC (permalink / raw)
To: xenomai-core
I made the following change to Xenomai (version 2.3.2, but it could also
be applied to 2.4 as the watchdog code has not been changed).
The watchdog timeout is fixed at 4 seconds. For us this is a problem as
there are some processes that take more time than this.
I made the following change to allow this to be changed through the
Linux kernel configuration. The value is configurable between 1 and 60
seconds.
Below is a patchfile that implements this change. Please let me know if
you have comments on this, or if there are problems with this change.
================
diff -u -r org/xenomai-2.3.2/ksrc/nucleus/Kconfig
xenomai-2.3.2/ksrc/nucleus/Kconfig
--- org/xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-07-06
18:42:14.000000000 +0200
+++ xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-09-04 14:13:41.000000000 +0200
@@ -172,6 +172,17 @@
behalf of the timer tick handler, thus is only active after
the timer has been started.
+config XENO_OPT_WATCHDOG_PERIOD
+ depends on XENO_OPT_WATCHDOG
+ int "Watchdog period (s)"
+ default 4
+ range 1 60
+ help
+
+ Nr of seconds of uninterrupted real-time activity after which
+ the watchdog triggers.
+
+
menu "Timing"
config XENO_OPT_TIMING_PERIODIC
diff -u -r org/xenomai-2.3.2/ksrc/nucleus/pod.c
xenomai-2.3.2/ksrc/nucleus/pod.c
--- org/xenomai-2.3.2/ksrc/nucleus/pod.c 2007-07-07
10:18:57.000000000 +0200
+++ xenomai-2.3.2/ksrc/nucleus/pod.c 2007-09-04 14:06:35.000000000 +0200
@@ -2925,7 +2925,7 @@
return nkpod->svctable.faulthandler(fltinfo);
}
-#ifdef CONFIG_XENO_OPT_WATCHDOG
+#if (defined CONFIG_XENO_OPT_WATCHDOG) &&
(CONFIG_XENO_OPT_WATCHDOG_PERIOD > 0)
/*!
* @internal
@@ -2948,7 +2948,7 @@
return;
}
- if (unlikely(++sched->wd_count >= 4)) {
+ if (unlikely(++sched->wd_count >=
CONFIG_XENO_OPT_WATCHDOG_PERIOD)) {
xnltt_log_event(xeno_ev_watchdog, thread->name);
xnprintf("watchdog triggered -- killing runaway thread
'%s'\n",
thread->name);
================
Kind regards,
Johan Borkhuis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Make watchdog-timer configurable
2007-09-04 13:12 [Xenomai-core] Make watchdog-timer configurable Johan Borkhuis
@ 2007-09-04 13:54 ` Philippe Gerum
2007-09-05 14:47 ` Gilles Chanteperdrix
2007-09-07 7:40 ` Philippe Gerum
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2007-09-04 13:54 UTC (permalink / raw)
To: Johan Borkhuis; +Cc: xenomai-core
On Tue, 2007-09-04 at 15:12 +0200, Johan Borkhuis wrote:
> I made the following change to Xenomai (version 2.3.2, but it could also
> be applied to 2.4 as the watchdog code has not been changed).
>
> The watchdog timeout is fixed at 4 seconds. For us this is a problem as
> there are some processes that take more time than this.
>
> I made the following change to allow this to be changed through the
> Linux kernel configuration. The value is configurable between 1 and 60
> seconds.
>
> Below is a patchfile that implements this change. Please let me know if
> you have comments on this, or if there are problems with this change.
>
Looks good. Will merge, thanks.
> ================
> diff -u -r org/xenomai-2.3.2/ksrc/nucleus/Kconfig
> xenomai-2.3.2/ksrc/nucleus/Kconfig
> --- org/xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-07-06
> 18:42:14.000000000 +0200
> +++ xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-09-04 14:13:41.000000000 +0200
> @@ -172,6 +172,17 @@
> behalf of the timer tick handler, thus is only active after
> the timer has been started.
>
> +config XENO_OPT_WATCHDOG_PERIOD
> + depends on XENO_OPT_WATCHDOG
> + int "Watchdog period (s)"
> + default 4
> + range 1 60
> + help
> +
> + Nr of seconds of uninterrupted real-time activity after which
> + the watchdog triggers.
> +
> +
> menu "Timing"
>
> config XENO_OPT_TIMING_PERIODIC
> diff -u -r org/xenomai-2.3.2/ksrc/nucleus/pod.c
> xenomai-2.3.2/ksrc/nucleus/pod.c
> --- org/xenomai-2.3.2/ksrc/nucleus/pod.c 2007-07-07
> 10:18:57.000000000 +0200
> +++ xenomai-2.3.2/ksrc/nucleus/pod.c 2007-09-04 14:06:35.000000000 +0200
> @@ -2925,7 +2925,7 @@
> return nkpod->svctable.faulthandler(fltinfo);
> }
>
> -#ifdef CONFIG_XENO_OPT_WATCHDOG
> +#if (defined CONFIG_XENO_OPT_WATCHDOG) &&
> (CONFIG_XENO_OPT_WATCHDOG_PERIOD > 0)
>
> /*!
> * @internal
> @@ -2948,7 +2948,7 @@
> return;
> }
>
> - if (unlikely(++sched->wd_count >= 4)) {
> + if (unlikely(++sched->wd_count >=
> CONFIG_XENO_OPT_WATCHDOG_PERIOD)) {
> xnltt_log_event(xeno_ev_watchdog, thread->name);
> xnprintf("watchdog triggered -- killing runaway thread
> '%s'\n",
> thread->name);
>
> ================
>
> Kind regards,
> Johan Borkhuis
>
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Make watchdog-timer configurable
2007-09-04 13:54 ` Philippe Gerum
@ 2007-09-05 14:47 ` Gilles Chanteperdrix
2007-09-05 15:05 ` Philippe Gerum
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2007-09-05 14:47 UTC (permalink / raw)
To: rpm; +Cc: xenomai-core
Philippe Gerum wrote:
> On Tue, 2007-09-04 at 15:12 +0200, Johan Borkhuis wrote:
> > I made the following change to Xenomai (version 2.3.2, but it could also
> > be applied to 2.4 as the watchdog code has not been changed).
> >
> > The watchdog timeout is fixed at 4 seconds. For us this is a problem as
> > there are some processes that take more time than this.
> >
> > I made the following change to allow this to be changed through the
> > Linux kernel configuration. The value is configurable between 1 and 60
> > seconds.
> >
> > Below is a patchfile that implements this change. Please let me know if
> > you have comments on this, or if there are problems with this change.
> >
>
> Looks good. Will merge, thanks.
I have nothing against the patch.
That said, if you have a real-time activity that does not let Linux run
for 4 seconds, you are risking some troubles when the real-time activity
gives back the control to Linux, such as random lockups for example.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Make watchdog-timer configurable
2007-09-05 14:47 ` Gilles Chanteperdrix
@ 2007-09-05 15:05 ` Philippe Gerum
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2007-09-05 15:05 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai-core
On Wed, 2007-09-05 at 16:47 +0200, Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> > On Tue, 2007-09-04 at 15:12 +0200, Johan Borkhuis wrote:
> > > I made the following change to Xenomai (version 2.3.2, but it could also
> > > be applied to 2.4 as the watchdog code has not been changed).
> > >
> > > The watchdog timeout is fixed at 4 seconds. For us this is a problem as
> > > there are some processes that take more time than this.
> > >
> > > I made the following change to allow this to be changed through the
> > > Linux kernel configuration. The value is configurable between 1 and 60
> > > seconds.
> > >
> > > Below is a patchfile that implements this change. Please let me know if
> > > you have comments on this, or if there are problems with this change.
> > >
> >
> > Looks good. Will merge, thanks.
>
> I have nothing against the patch.
>
> That said, if you have a real-time activity that does not let Linux run
> for 4 seconds, you are risking some troubles when the real-time activity
> gives back the control to Linux, such as random lockups for example.
>
You could also use this feature to lower the deadline below 4 secs,
which is already pretty high.
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Make watchdog-timer configurable
2007-09-04 13:12 [Xenomai-core] Make watchdog-timer configurable Johan Borkhuis
2007-09-04 13:54 ` Philippe Gerum
@ 2007-09-07 7:40 ` Philippe Gerum
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2007-09-07 7:40 UTC (permalink / raw)
To: Johan Borkhuis; +Cc: xenomai-core
On Tue, 2007-09-04 at 15:12 +0200, Johan Borkhuis wrote:
> I made the following change to Xenomai (version 2.3.2, but it could also
> be applied to 2.4 as the watchdog code has not been changed).
>
Merged, with forward port to 2.4. Thanks.
> The watchdog timeout is fixed at 4 seconds. For us this is a problem as
> there are some processes that take more time than this.
>
> I made the following change to allow this to be changed through the
> Linux kernel configuration. The value is configurable between 1 and 60
> seconds.
>
> Below is a patchfile that implements this change. Please let me know if
> you have comments on this, or if there are problems with this change.
>
> ================
> diff -u -r org/xenomai-2.3.2/ksrc/nucleus/Kconfig
> xenomai-2.3.2/ksrc/nucleus/Kconfig
> --- org/xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-07-06
> 18:42:14.000000000 +0200
> +++ xenomai-2.3.2/ksrc/nucleus/Kconfig 2007-09-04 14:13:41.000000000 +0200
> @@ -172,6 +172,17 @@
> behalf of the timer tick handler, thus is only active after
> the timer has been started.
>
> +config XENO_OPT_WATCHDOG_PERIOD
> + depends on XENO_OPT_WATCHDOG
> + int "Watchdog period (s)"
> + default 4
> + range 1 60
> + help
> +
> + Nr of seconds of uninterrupted real-time activity after which
> + the watchdog triggers.
> +
> +
> menu "Timing"
>
> config XENO_OPT_TIMING_PERIODIC
> diff -u -r org/xenomai-2.3.2/ksrc/nucleus/pod.c
> xenomai-2.3.2/ksrc/nucleus/pod.c
> --- org/xenomai-2.3.2/ksrc/nucleus/pod.c 2007-07-07
> 10:18:57.000000000 +0200
> +++ xenomai-2.3.2/ksrc/nucleus/pod.c 2007-09-04 14:06:35.000000000 +0200
> @@ -2925,7 +2925,7 @@
> return nkpod->svctable.faulthandler(fltinfo);
> }
>
> -#ifdef CONFIG_XENO_OPT_WATCHDOG
> +#if (defined CONFIG_XENO_OPT_WATCHDOG) &&
> (CONFIG_XENO_OPT_WATCHDOG_PERIOD > 0)
>
> /*!
> * @internal
> @@ -2948,7 +2948,7 @@
> return;
> }
>
> - if (unlikely(++sched->wd_count >= 4)) {
> + if (unlikely(++sched->wd_count >=
> CONFIG_XENO_OPT_WATCHDOG_PERIOD)) {
> xnltt_log_event(xeno_ev_watchdog, thread->name);
> xnprintf("watchdog triggered -- killing runaway thread
> '%s'\n",
> thread->name);
>
> ================
>
> Kind regards,
> Johan Borkhuis
>
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-09-07 7:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-04 13:12 [Xenomai-core] Make watchdog-timer configurable Johan Borkhuis
2007-09-04 13:54 ` Philippe Gerum
2007-09-05 14:47 ` Gilles Chanteperdrix
2007-09-05 15:05 ` Philippe Gerum
2007-09-07 7:40 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.