Re: [PATCH] watchdog: revert cleanup handling of false positives

From: Sergey Senozhatsky
Date: Thu May 20 2021 - 01:13:39 EST


On (21/05/18 17:36), Petr Mladek wrote:
> On Mon 2021-05-17 23:06:12, Sergey Senozhatsky wrote:
> > This reverts commit 9bf3bc949f8aeefeacea4b1198db833b722a8e27.
> >
> > I can reproduce the case when resumed VCPU starts to execute
> > is_softlockup() with PVCLOCK_GUEST_STOPPED set on this VCPU:
> >
> > watchdog_timer_fn()
> > {
> > ...
> >
> > kvm_check_and_clear_guest_paused();
> >
> > ...
> >
> > duration = is_softlockup(touch_ts, period_ts);
> > if (unlikely(duration)) {
> > ....
> > }
> > }
> >
> > Which means that guest VCPU has been suspended between
> > kvm_check_and_clear_guest_paused() and is_softlockup(),
> > and jiffies (clock) thus shifted forward.
>
> Are jiffies really updated here?

I guess so. Why not?

VCPUs are not brought up simultaneously, it's up to the host that
schedules them. So, for instance, when we resume VCPU-3 and it
discovers this_cpu PVCLOCK_GUEST_STOPPED the VCPU-0 can already
be resumed, up and running, adding ticks to jiffies.

Am I missing the point of your question?