[PATCH v4 4/4] watchdog: Add support for VIA/WonderMedia SoC watchdog functionality

Guenter Roeck linux at roeck-us.net
Wed May 21 13:03:50 PDT 2025


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




More information about the linux-arm-kernel mailing list