All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Doug Anderson <dianders@chromium.org>,
	Guenter Roeck <patchwork@patchwork.roeck-us.net>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"Wim Van Sebroeck" <wim@iguana.be>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Timo Kokkonen" <timo.kokkonen@offcode.fi>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>
Subject: Re: [RFT PATCH v7 9/9] watchdog: dw_wdt: Convert to use watchdog infrastructure
Date: Fri, 29 Jan 2016 10:24:33 -0800	[thread overview]
Message-ID: <56ABAE61.2020607@roeck-us.net> (raw)
In-Reply-To: <CAD=FV=ULSrU+Hwiif=FAHE5EuNkTEtY85cnS-mUbO5eFb8JuHw@mail.gmail.com>

Hi Doug,

On 01/29/2016 09:52 AM, Doug Anderson wrote:
> Guenter,
>
> On Mon, Jan 25, 2016 at 6:53 PM, Guenter Roeck
> <patchwork@patchwork.roeck-us.net> wrote:
>> From: Guenter Roeck <linux@roeck-us.net>
>>
>> Convert driver to use watchdog infrastructure. This includes
>> infrastructure support to handle watchdog keepalive if the watchdog
>> is running while the watchdog device is closed.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>
>> ---
>> v7: Set max_hw_timeout_ms
>>      Rebased to v4.5-rc1
>> v6: Added patch
>> ---
>>   drivers/watchdog/Kconfig  |   1 +
>>   drivers/watchdog/dw_wdt.c | 323 +++++++++++++++++-----------------------------
>>   2 files changed, 117 insertions(+), 207 deletions(-)
>
> I used the following test environment:
> * Rockchip rk3288-based Chromebook
> * v4.4-based kernel (specifically commit b1ba57898bfc
> ("veyron_defconfig: update for 4.5-rc") from Heiko Stuebner "somewhat
> stable" development tree
> * Pulled in some USB-related fixes (just for my own testing)
> * Pulled in Wim's most recent pull request for watchdog subsystem
> (ac36856fe432 watchdog: asm9260: remove __init and __exit annotations)
> * Applied all 9 of your patches
> * Test with daisydog
> <https://chromium.googlesource.com/chromiumos/third_party/daisydog/>
>
>
> I did these tests:
>
> ###
> # Confirm normal functionality
> ###
>
> stop daisydog
> daisydog -c
> # HW watchdog interval is 43 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> cat /dev/watchdog
> # cat: [ 5401.044582] watchdog watchdog0: watchdog did not stop!
> # /dev/watchdog: Invalid argument
>
> for i in $(seq 60); do
>     echo $i
>     sleep 1
>   done
> # 1 - 43 printed, then reboot
>
> ###
> # Try setting interval, confirm all good (no reboots)
> # ...then confirm that reboot happens in 10 sec
> ###
>
> stop daisydog
> daisydog -c
> # HW watchdog interval is 43 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> daisydog -i 10
> # HW watchdog interval is 10 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> <Ctrl-C>
>
> daisydog -c
> # HW watchdog interval is 10 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> sleep 60
> # No reboots
>
> cat /dev/watchdog
> # cat: [ 5401.044582] watchdog watchdog0: watchdog did not stop!
> # /dev/watchdog: Invalid argument
>
> for i in $(seq 60); do
>     echo $i
>     sleep 1
>   done
> # 1 - 11 printed, then reboot
>
> ###
> # Try setting interval super long
> # (outside of hardware range)
> ###
>
> stop daisydog
> daisydog -i 100 -c
> # HW watchdog interval is 86 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> cat /dev/watchdog
> # cat: [ 5401.044582] watchdog watchdog0: watchdog did not stop!
> # /dev/watchdog: Invalid argument
>
> for i in $(seq 200); do
>     echo $i
>     sleep 1
>   done
> # 1 - 87 printed, then reboot; seems right to me.
>
> ###
> # Try with a interval that's in hardware range, but above default
> ###
>
> stop daisydog
> daisydog -i 70 -c
> # HW watchdog interval is 86 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> cat /dev/watchdog
> # cat: [ 5401.044582] watchdog watchdog0: watchdog did not stop!
> # /dev/watchdog: Invalid argument
>
> for i in $(seq 200); do
>     echo $i
>     sleep 1
>   done
> # 1 - 87 printed, then reboot; seems right to me
>
> ###
> # Make sure my previous fix not regressed:
> # 04b1a62e6bb9 ("watchdog: dw_wdt: keepalive the watchdog at write time")
> ###
>
> stop daisydog
> while true; do daisydog -c > /dev/null; done
>
> # Let the above run for a 2 minutes and see no reboot.
>
> ###
> # See what happens when you change things midway
> ###
>
> stop daisydog
> daisydog -c
> # HW watchdog interval is 43 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> cat /dev/watchdog
> # cat: [ 5401.044582] watchdog watchdog0: watchdog did not stop!
> # /dev/watchdog: Invalid argument
>
> for i in $(seq 30); do
>     echo $i
>     sleep 1
>   done
> # 1 - 30 printed
>
> daisydog -c -i 10
> # HW watchdog interval is 10 seconds
> # /dev/watchdog reported boot status: normal-boot
>
> sleep 60
> # No reboot; right since the "-c -i 10" patted + closed properly
>
> ===
>
> I also tried the new functionality enabled by your new patch and added
> "timeout-sec = <10>" to my device tree.  That seemed to work.  Upon
> bootup the watchdog defaulted to 10 seconds.  I also tried setting it
> to 86 in the device tree with similar success.
>
> ===
>
> The above seem to cover all the cases I can think of.
>
> Tested-by: Douglas Anderson <dianders@chromium.org>
>

Excellent - thanks a lot for the testing!

Guenter


  reply	other threads:[~2016-01-29 18:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26  2:53 [PATCH v7 0/9] watchdog: Add support for keepalives triggered by infrastructure Guenter Roeck
2016-01-26  2:53 ` [PATCH v7 1/9] watchdog: Introduce hardware maximum timeout in watchdog core Guenter Roeck
2016-02-28 13:18   ` Wim Van Sebroeck
2016-02-28 18:43     ` Guenter Roeck
2016-01-26  2:53 ` [PATCH v7 2/9] watchdog: Introduce WDOG_HW_RUNNING flag Guenter Roeck
2016-01-26  2:53 ` [PATCH v7 3/9] watchdog: Make set_timeout function optional Guenter Roeck
2016-01-26  2:53 ` [PATCH v7 4/9] watchdog: Add support for minimum time between heartbeats Guenter Roeck
2016-01-26  8:07   ` Uwe Kleine-König
2016-01-26 14:42     ` Guenter Roeck
2016-01-26  2:53 ` [PATCH v7 5/9] watchdog: Simplify update_worker Guenter Roeck
2016-01-26  2:53 ` [RFT PATCH v7 6/9] watchdog: imx2: Convert to use infrastructure triggered keepalives Guenter Roeck
2016-01-29 19:40   ` Guenter Roeck
2016-01-26  2:53 ` [RFT PATCH v7 7/9] watchdog: retu: " Guenter Roeck
2016-01-26  2:53 ` [RFT PATCH v7 8/9] watchdog: at91sam9: " Guenter Roeck
2016-01-26  2:53 ` [RFT PATCH v7 9/9] watchdog: dw_wdt: Convert to use watchdog infrastructure Guenter Roeck
2016-01-29 17:52   ` Doug Anderson
2016-01-29 18:24     ` Guenter Roeck [this message]
2016-01-26  8:09 ` [PATCH v7 0/9] watchdog: Add support for keepalives triggered by infrastructure Uwe Kleine-König
2016-01-26 14:43   ` Guenter Roeck

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=56ABAE61.2020607@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=corbet@lwn.net \
    --cc=dianders@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=patchwork@patchwork.roeck-us.net \
    --cc=timo.kokkonen@offcode.fi \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wim@iguana.be \
    /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 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.