[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <26ee624d-ac64-46b7-837d-550df3fa7ab1@roeck-us.net>
Date: Wed, 21 May 2025 13:03:50 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Alexey Charkov <alchark@...il.com>
Cc: Krzysztof Kozlowski <krzk@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>, Rob Herring <robh@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Wim Van Sebroeck <wim@...ux-watchdog.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-watchdog@...r.kernel.org
Subject: Re: [PATCH v4 4/4] watchdog: Add support for VIA/WonderMedia SoC
watchdog functionality
On 5/21/25 07:15, Alexey Charkov wrote:
...
>>> Do I get it right that the core worker will try and do its last ping
>>> of the hardware at exactly max_hw_heartbeat_ms before the user
>>> specified deadline?
>>>
>>
>> Where do you see that ? In the watchdog core:
>>
>> hw_heartbeat_ms = min_not_zero(timeout_ms, wdd->max_hw_heartbeat_ms);
>> keepalive_interval = ms_to_ktime(hw_heartbeat_ms / 2);
>
> This comment [1] which follows the lines you've pasted: "To ensure
> that the watchdog times out wdd->timeout seconds after the most recent
> ping from userspace, the last worker ping has to come in
> hw_heartbeat_ms before this timeout."
>
Ah, yes. Sorry, I misunderstood your question. This is absolutely correct.
If timeout is, say, 10 seconds, and the maximum hardware timeout is 8 seconds,
the last heartbeat must be triggered by the kernel 2 seconds after the last
userspace heartbeat request to ensure that the actual timeout happens 10
seconds after the most recent heartbeat request from userspace.
Guenter
Powered by blists - more mailing lists