From: Paolo Bonzini <pbonzini@redhat.com>
To: paulmck@kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: Guest OS migration and lost IPIs
Date: Fri, 7 Aug 2020 14:36:17 +0200 [thread overview]
Message-ID: <191fd6d6-a66e-06b1-aa6e-9a0f12efcfc8@redhat.com> (raw)
In-Reply-To: <20200805000720.GA7516@paulmck-ThinkPad-P72>
On 05/08/20 02:07, Paul E. McKenney wrote:
>
> We are seeing occasional odd hangs, but only in cases where guest OSes
> are being migrated. Migrating more often makes the hangs happen more
> frequently.
>
> Added debug showed that the hung CPU is stuck trying to send an IPI (e.g.,
> smp_call_function_single()). The hung CPU thinks that it has sent the
> IPI, but the destination CPU has interrupts enabled (-not- disabled,
> enabled, as in ready, willing, and able to take interrupts). In fact,
> the destination CPU usually is going about its business as if nothing
> was wrong, which makes me suspect that the IPI got lost somewhere along
> the way.
>
> I bumbled a bit through the qemu and KVM source, and didn't find anything
> synchronizing IPIs and migrations, though given that I know pretty much
> nothing about either qemu or KVM, this doesn't count for much.
The code migrating the interrupt controller is in
kvm_x86_ops.sync_pir_to_irr (which calls vmx_sync_pir_to_irr) and
kvm_apic_get_state. kvm_apic_get_state is called after CPUs are stopped.
It's possible that we're missing a kvm_x86_ops.sync_pir_to_irr call
somewhere. It would be surprising but it would explain the symptoms
very well.
Paolo
next prev parent reply other threads:[~2020-08-07 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 0:07 Guest OS migration and lost IPIs Paul E. McKenney
2020-08-07 12:36 ` Paolo Bonzini [this message]
2020-08-08 2:02 ` Paul E. McKenney
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=191fd6d6-a66e-06b1-aa6e-9a0f12efcfc8@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=paulmck@kernel.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