From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299AbbHAOjh (ORCPT ); Sat, 1 Aug 2015 10:39:37 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:57097 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbbHAOjg (ORCPT ); Sat, 1 Aug 2015 10:39:36 -0400 Date: Sat, 1 Aug 2015 10:39:22 -0400 (EDT) From: Ulrich Obergfell To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dzickus@redhat.com, atomlin@redhat.com, jolsa@kernel.org, mhocko@suse.cz, eranian@google.com, cmetcalf@ezchip.com, fweisbec@gmail.com Message-ID: <1011280917.2174199.1438439962274.JavaMail.zimbra@redhat.com> In-Reply-To: <20150801140416.GA31835@roeck-us.net> References: <1438433365-2979-1-git-send-email-uobergfe@redhat.com> <1438433365-2979-3-git-send-email-uobergfe@redhat.com> <20150801140416.GA31835@roeck-us.net> Subject: Re: [PATCH 2/4] watchdog: introduce watchdog_suspend() and watchdog_resume() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.36.4.124] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF22 (Linux)/8.0.6_GA_5922) Thread-Topic: watchdog: introduce watchdog_suspend() and watchdog_resume() Thread-Index: 0Vyu3cDq4tjXKMS3AHseYQefXEVvAg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > ----- Original Message ----- > From: "Guenter Roeck" > ... > Subject: Re: [PATCH 2/4] watchdog: introduce watchdog_suspend() and watchdog_resume() > > On Sat, Aug 01, 2015 at 02:49:23PM +0200, Ulrich Obergfell wrote: >> This interface can be utilized to deactivate the hard and soft lockup >> detector temporarily. Callers are expected to minimize the duration of >> deactivation. Multiple deactivations are allowed to occur in parallel >> but should be rare in practice. >> >> Signed-off-by: Ulrich Obergfell >> --- >> include/linux/nmi.h | 2 ++ >> kernel/watchdog.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 67 insertions(+) >> >> diff --git a/include/linux/nmi.h b/include/linux/nmi.h >> index f94da0e..60050c2 100644 >> --- a/include/linux/nmi.h >> +++ b/include/linux/nmi.h >> @@ -80,6 +80,8 @@ extern int proc_watchdog_thresh(struct ctl_table *, int , >> void __user *, size_t *, loff_t *); >> extern int proc_watchdog_cpumask(struct ctl_table *, int, >> void __user *, size_t *, loff_t *); >> +extern int watchdog_suspend(void); >> +extern void watchdog_resume(void); > > How about nmi_watchdog_enable() and nmi_watchdog_disable() to avoid confusion > with the watchdog subsystem ? Guenter, Good point. However, I would like to avoid the 'nmi_' prefix in the function names as it could be misleading. watchdog_{suspend|resume} affect both -the hard and soft lockup detector- so I think function names like lockup_detector_suspend() instead of watchdog_suspend() lockup_detector_resume() instead of watchdog_resume() would summarize better what these functions are intended to be used for. The above names would also be consistent with the existing name lockup_detector_init() Many Thanks, Uli