Skip to contentSkip to conversation

Millisecond level watchdog interface

DISCUSSION Corey Minyard 2 participants 2 messages Jun 16, 2020 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I'm representing the Elisa group, an organization working on making it easier to use Linux in safety critical applications.

As part of this, one thing we need is a watchdog that has a much finer granularity than one second. In some applications, that is just too long.

Would the watchdog maintainers be ameniable to changes to the interface to support finer granularity? Milliseconds should be fine, though higher resolution would be fine, too.

If so, there are a number of ways you can implement this. You could make the interface modal, meaning that you "throw a switch" and the standard interfaces become millisecond-level. Or you could create new ioctls with millisecond level granularity. You would probably want some way to fetch the granularity of the timer, too. Maybe there's another better way.

Thanks,

-corey

maintainer
#1 lore raw
Quoted 9 lines · Corey Minyard

Hi,

I'm representing the Elisa group, an organization working on making it easier to use Linux in safety critical applications.

As part of this, one thing we need is a watchdog that has a much finer granularity than one second. In some applications, that is just too long.

Quoted 7 lines

Would the watchdog maintainers be ameniable to changes to the interface to support finer granularity? Milliseconds should be fine, though higher resolution would be fine, too.

If so, there are a number of ways you can implement this. You could make the interface modal, meaning that you "throw a switch" and the standard interfaces become millisecond-level. Or you could create new

I would consider that a no-go. We have to be and remain backwards compatible.

Quoted 4 lines

ioctls with millisecond level granularity. You would probably want some way to fetch the granularity of the timer, too. Maybe there's another better way.

We would have to add a new set of ioctls. Drivers could probably use the existing API but indicate resolution in struct watchdog_info (something like WDIOF_RESOLUTION_MS in watchdog_info.options, maybe). I am open to suggestions.

Guenter