mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Valentin Vidic <Valentin.Vidic@CARNet.hr>,
	openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipmi/watchdog: fix watchdog timeout set on reboot
Date: Fri, 5 May 2017 14:41:23 -0500	[thread overview]
Message-ID: <885e88c7-edd7-d56a-328f-614c438dc785@acm.org> (raw)
In-Reply-To: <20170505190733.7313-1-Valentin.Vidic@CARNet.hr>

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 <Valentin.Vidic@CARNet.hr>
> ---
>   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);

      reply	other threads:[~2017-05-05 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 19:07 Valentin Vidic
2017-05-05 19:41 ` Corey Minyard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=885e88c7-edd7-d56a-328f-614c438dc785@acm.org \
    --to=minyard@acm.org \
    --cc=Valentin.Vidic@CARNet.hr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®