[RFC PATCH] watchdog: Adding softwatchdog

From: Peter Enderborg
Date: Sat Apr 24 2021 - 06:27:15 EST


First it is not a new softdog.
This adds function that do other actions than a reboot. It intended to be
used to help userspace management and monitoring going but can
be used standalone too.

The idea is to use watchdog interface, instead of reboot, a timer
function do a softer action. In this case it is using oom_score_adj
to pick a task to kill. So this is assuming that watchdog kicker
is not respoding due to high memory pressure. A other usecase might
be a selecting a task from a UID or what ever is problematic,
it does not have to be a memory issue.
But core thing is to have other actions than hard reboot.

The patch need more works, but it can be tested as it is.