From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755377AbdEETl2 (ORCPT ); Fri, 5 May 2017 15:41:28 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33201 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754768AbdEETl0 (ORCPT ); Fri, 5 May 2017 15:41:26 -0400 Reply-To: minyard@acm.org Subject: Re: [PATCH] ipmi/watchdog: fix watchdog timeout set on reboot References: <20170505190733.7313-1-Valentin.Vidic@CARNet.hr> To: Valentin Vidic , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org From: Corey Minyard Message-ID: <885e88c7-edd7-d56a-328f-614c438dc785@acm.org> Date: Fri, 5 May 2017 14:41:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170505190733.7313-1-Valentin.Vidic@CARNet.hr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/05/2017 02:07 PM, Valentin Vidic wrote: > systemd by default starts watchdog on reboot and sets the timer to > ShutdownWatchdogSec=10min. Reboot handler in ipmi_watchdog than reduces > the timer to 120s which is not enough time to boot a Xen machine with > a lot of RAM. As a result the machine is rebooted the second time > during the long run of (XEN) Scrubbing Free RAM..... > > Fix this by setting the timer to 120s only if it was previously > set to a low value. Yeah, you are probably right. In queue for 4.13. -corey > Signed-off-by: Valentin Vidic > --- > drivers/char/ipmi/ipmi_watchdog.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c > index d165af8abe36..4161d9961a24 100644 > --- a/drivers/char/ipmi/ipmi_watchdog.c > +++ b/drivers/char/ipmi/ipmi_watchdog.c > @@ -1163,10 +1163,11 @@ static int wdog_reboot_handler(struct notifier_block *this, > ipmi_watchdog_state = WDOG_TIMEOUT_NONE; > ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB); > } else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) { > - /* Set a long timer to let the reboot happens, but > - reboot if it hangs, but only if the watchdog > + /* Set a long timer to let the reboot happen or > + reset if it hangs, but only if the watchdog > timer was already running. */ > - timeout = 120; > + if (timeout < 120) > + timeout = 120; > pretimeout = 0; > ipmi_watchdog_state = WDOG_TIMEOUT_RESET; > ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);