]> git.baikalelectronics.ru Git - kernel.git/commit
misc: Add a mechanism to detect stalls on guest vCPUs
authorSebastian Ene <sebastianene@google.com>
Mon, 11 Jul 2022 08:17:20 +0000 (08:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jul 2022 14:54:17 +0000 (16:54 +0200)
commitee9db71b5dd98385151a3d5dfdd05dac916dff76
treeeecf58af1a6c98b6fba0aaa679df66399f787830
parenta20f1e935bf61665f49663aa5ff9e78cf13ab33f
misc: Add a mechanism to detect stalls on guest vCPUs

This driver creates per-cpu hrtimers which are required to do the
periodic 'pet' operation. On a conventional watchdog-core driver, the
userspace is responsible for delivering the 'pet' events by writing to
the particular /dev/watchdogN node. In this case we require a strong
thread affinity to be able to account for lost time on a per vCPU.

This part of the driver is the 'frontend' which is reponsible for
delivering the periodic 'pet' events, configuring the virtual peripheral
and listening for cpu hotplug events. The other part of the driver is
an emulated MMIO device which is part of the KVM virtual machine
monitor and this part accounts for lost time by looking at the
/proc/{}/task/{}/stat entries.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Will Deacon <will@kernel.org>
Signed-off-by: Sebastian Ene <sebastianene@google.com>
Link: https://lore.kernel.org/r/20220711081720.2870509-3-sebastianene@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/vcpu_stall_detector.c [new file with mode: 0644]