From: "Paul E. McKenney" <paulmck@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2 1/2] rcu/tree: handle VM stoppage in stall detection
Date: Thu, 15 Jul 2021 06:32:41 -0700 [thread overview]
Message-ID: <20210715133241.GJ4397@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <YO/7WS/WefdkFFbj@google.com>
On Thu, Jul 15, 2021 at 06:09:45PM +0900, Sergey Senozhatsky wrote:
> On (21/05/22 00:56), Sergey Senozhatsky wrote:
> > Soft watchdog timer function checks if a virtual machine
> > was suspended and hence what looks like a lockup in fact
> > is a false positive.
> >
> > This is what kvm_check_and_clear_guest_paused() does: it
> > tests guest PVCLOCK_GUEST_STOPPED (which is set by the host)
> > and if it's set then we need to touch all watchdogs and bail
> > out.
> >
> > Watchdog timer function runs from IRQ, so PVCLOCK_GUEST_STOPPED
> > check works fine.
> >
> > There is, however, one more watchdog that runs from IRQ, so
> > watchdog timer fn races with it, and that watchdog is not aware
> > of PVCLOCK_GUEST_STOPPED - RCU stall detector.
> >
> > apic_timer_interrupt()
> > smp_apic_timer_interrupt()
> > hrtimer_interrupt()
> > __hrtimer_run_queues()
> > tick_sched_timer()
> > tick_sched_handle()
> > update_process_times()
> > rcu_sched_clock_irq()
> >
> > This triggers RCU stalls on our devices during VM resume.
> >
> > If tick_sched_handle()->rcu_sched_clock_irq() runs on a VCPU
> > before watchdog_timer_fn()->kvm_check_and_clear_guest_paused()
> > then there is nothing on this VCPU that touches watchdogs and
> > RCU reads stale gp stall timestamp and new jiffies value, which
> > makes it think that RCU has stalled.
> >
> > Make RCU stall watchdog aware of PVCLOCK_GUEST_STOPPED and
> > don't report RCU stalls when we resume the VM.
>
> Hello Paul,
>
> I've noticed that this patch set didn't make it to Linus's tree.
> Was it intentional?
This patch (and the 18 preceding it) didn't make the cutoff for the
just-past merge window. If this patch is urgent, please let me know
and I can push it, with luck by the end of next week.
If that one is urgent, are these two also?
817690fd18af ("rcu: Do not disable GP stall detection in rcu_cpu_stall_reset()")
9ed9bf0d17cd ("rcu: Start timing stall repetitions after warning complete")
If so, it is better to handle them as a group than separately.
The cutoff for a given merge window is normally shortly after the close
of the previous merge window. This time, I am a bit slow creating
branches, but the cutoff for the v5.15 merge window should be by the
end of the week. This is a bit more lag than most subsystems, but
this is after all RCU.
As always, if a given commit is urgent, please let me know and I
will see what I can do to fast-track it.
For reference:
https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/rcutodo.html
Again, if this one needs to hit mainline before the v5.15 merge
window, please let me know.
Thanx, Paul
next prev parent reply other threads:[~2021-07-15 13:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 15:56 Sergey Senozhatsky
2021-05-21 15:56 ` [PATCH 2/2] rcu: do not disable gp stall detection in rcu_cpu_stall_reset() Sergey Senozhatsky
2021-05-21 18:01 ` [PATCHv2 1/2] rcu/tree: handle VM stoppage in stall detection Paul E. McKenney
2021-05-21 21:38 ` Paul E. McKenney
2021-05-24 1:56 ` Sergey Senozhatsky
2021-05-24 3:46 ` Paul E. McKenney
2021-05-24 4:00 ` Sergey Senozhatsky
2021-07-15 9:09 ` Sergey Senozhatsky
2021-07-15 13:32 ` Paul E. McKenney [this message]
2021-07-15 14:08 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210715133241.GJ4397@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®