public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Yang Zhang <yang.z.zhang@Intel.com>,
	Jan Kiszka <jan.kiszka@web.de>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers
Date: Thu, 21 Mar 2013 11:02:24 -0300	[thread overview]
Message-ID: <20130321140224.GA29237@amt.cnet> (raw)
In-Reply-To: <20130321045446.GC9382@redhat.com>

On Thu, Mar 21, 2013 at 06:54:46AM +0200, Gleb Natapov wrote:
> On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti wrote:
> > On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrote:
> > > On Wed, Mar 20, 2013 at 05:03:19PM -0300, Marcelo Tosatti wrote:
> > > > On Wed, Mar 20, 2013 at 04:30:33PM -0300, Marcelo Tosatti wrote:
> > > > > On Sun, Mar 17, 2013 at 12:47:17PM +0200, Gleb Natapov wrote:
> > > > > > On Sun, Mar 17, 2013 at 11:45:34AM +0100, Jan Kiszka wrote:
> > > > > > > On 2013-03-17 09:47, Gleb Natapov wrote:
> > > > > > > > On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote:
> > > > > > > >> From: Jan Kiszka <jan.kiszka@siemens.com>
> > > > > > > >>
> > > > > > > >> If the guest didn't take the last APIC timer interrupt yet and generates
> > > > > > > >> another one on top, e.g. via periodic mode, we do not block the VCPU
> > > > > > > >> even if the guest state is halted. The reason is that
> > > > > > > >> apic_has_pending_timer continues to return a non-zero value.
> > > > > > > >>
> > > > > > > >> Fix this busy loop by taking the IRR content for the LVT vector in
> > > > > > > >> apic_has_pending_timer into account.
> > > > > > > >>
> > > > > > > > Just drop coalescing tacking for lapic interrupt. After posted interrupt
> > > > > > > > will be merged __apic_accept_irq() will not longer return coalescing
> > > > > > > > information, so the code will be dead anyway.
> > > > > > > 
> > > > > > > That requires the RTC decoalescing series to go first to avoid a
> > > > > > > regression, no? Then let's postpone this topic for now.
> > > > > > > 
> > > > > > Yes, but decoalescing will work only for RTC :(
> > > > > 
> > > > > Are you proposing to drop LAPIC interrupt reinjection? 
> > > > 
> > > > Since timer handling and injection is VCPU-local for LAPIC,
> > > > __apic_accept_irq can (and must) return coalesced information (cannot
> > > > drop LAPIC interrupt reinjection).
> > > > 
> > > Why can't we drop LAPIC interrupt reinjection? Proposed posted interrupt
> > > patches do not properly check for interrupt coalescing even for
> > > VCPU-local injection.
> > > 
> > > --
> > > 			Gleb.
> > 
> > Because older Linux guests depend on reinjection for proper timekeeping.
> Which versions? Those without kvmclock? Can we make them use PIT instead?
> Posted interrupts going to break them.

There is no reason to break them if its OK to receive reinjection info
from LAPIC... its a matter of returning the information from
apic_accept_irq, no big deal.



  reply	other threads:[~2013-03-21 14:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16 20:49 [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers Jan Kiszka
2013-03-17  8:47 ` Gleb Natapov
2013-03-17 10:45   ` Jan Kiszka
2013-03-17 10:47     ` Gleb Natapov
2013-03-20 19:30       ` Marcelo Tosatti
2013-03-20 20:03         ` Marcelo Tosatti
2013-03-20 21:32           ` Gleb Natapov
2013-03-20 23:19             ` Marcelo Tosatti
2013-03-21  4:54               ` Gleb Natapov
2013-03-21 14:02                 ` Marcelo Tosatti [this message]
2013-03-21 14:18                   ` Gleb Natapov
2013-03-21 14:27                     ` Zhang, Yang Z
2013-03-21 16:27                       ` Gleb Natapov
2013-03-21 20:51                         ` Marcelo Tosatti
2013-03-21 21:13                           ` Gleb Natapov
2013-03-21 23:06                             ` Marcelo Tosatti
2013-03-22  1:50                               ` Zhang, Yang Z
2013-03-22  6:53                               ` Gleb Natapov
2013-03-22 10:43                                 ` Marcelo Tosatti
2013-03-22 11:19                                   ` Gleb Natapov
2013-03-24 10:45                                     ` Zhang, Yang Z
2013-03-24 19:03                                       ` Gleb Natapov
2013-04-28 10:15   ` Jan Kiszka
2013-04-28 10:19     ` Gleb Natapov
2013-04-28 10:20       ` Jan Kiszka
2013-04-28 10:23         ` Gleb Natapov

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=20130321140224.GA29237@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=yang.z.zhang@Intel.com \
    /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