Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1668138
| From | Nicholas Piggin <npiggin@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs |
| Date | 2017-06-17 05:00 +0200 |
| Message-ID | <tTc7T-HT-5@gated-at.bofh.it> (permalink) |
| References | <tSToB-4Ym-11@gated-at.bofh.it> <tSToC-4Ym-13@gated-at.bofh.it> <tT4an-3MU-35@gated-at.bofh.it> |
| Organization | IBM |
On Fri, 16 Jun 2017 11:24:07 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 16 Jun 2017 16:57:14 +1000 Nicholas Piggin <npiggin@gmail.com> wrote:
>
> > After reconfiguring watchdog sysctls etc., architecture specific
> > watchdogs may not get all their parameters updated.
> >
> > watchdog_reconfigure() can be implemented to pull the new values
> > in and set the arch NMI watchdog.
> >
>
> I'll update the title and changelog to say "watchdog_nmi_reconfigure".
Thanks.
> > --- a/kernel/watchdog.c
> > +++ b/kernel/watchdog.c
> > @@ -123,6 +123,11 @@ void __weak watchdog_nmi_disable(unsigned int cpu)
> > {
> > }
> >
> > +void __weak watchdog_nmi_reconfigure(void)
> > +{
> > +}
>
> Can we please get some documentation in here describing what it's for?
> How arch maintainers might use this? When and why it is called, what
> it must do? etc.
Good point, how's this?
---
kernel/watchdog.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 06cd965f64d2..36531025496f 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -114,6 +114,10 @@ int __read_mostly watchdog_suspended;
/*
* These functions can be overridden if an architecture implements its
* own hardlockup detector.
+ *
+ * watchdog_nmi_enable/disable can be implemented to start and stop when
+ * softlockup watchdog threads start and stop. The arch must select the
+ * SOFTLOCKUP_DETECTOR Kconfig.
*/
int __weak watchdog_nmi_enable(unsigned int cpu)
{
@@ -123,6 +127,17 @@ void __weak watchdog_nmi_disable(unsigned int cpu)
{
}
+/*
+ * watchdog_nmi_reconfigure can be implemented to be notified after any
+ * watchdog configuration change. The arch hardlockup watchdog should
+ * respond to the following variables:
+ * - nmi_watchdog_enabled
+ * - watchdog_thresh
+ * - watchdog_cpumask
+ * - sysctl_hardlockup_all_cpu_backtrace
+ * - hardlockup_panic
+ * - watchdog_suspended
+ */
void __weak watchdog_nmi_reconfigure(void)
{
}
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs Nicholas Piggin <npiggin@gmail.com> - 2017-06-16 09:00 +0200
Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs Andrew Morton <akpm@linux-foundation.org> - 2017-06-16 20:30 +0200
Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs Nicholas Piggin <npiggin@gmail.com> - 2017-06-17 05:00 +0200
csiph-web