From: Gleb Natapov <gleb@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH v2 0/5] ioapic/lapic/msi cleanup
Date: Fri, 6 Mar 2009 08:06:02 +0200 [thread overview]
Message-ID: <20090306060602.GB6510@redhat.com> (raw)
In-Reply-To: <20090305223436.GA7818@amt.cnet>
On Thu, Mar 05, 2009 at 07:34:36PM -0300, Marcelo Tosatti wrote:
> On Thu, Mar 05, 2009 at 04:34:38PM +0200, Gleb Natapov wrote:
> > There are many code/logic duplications throughout ioapic/lapic/msi device
> > emulation. Try to consolidate as much code as possible.
> >
> > ---
> >
> > Gleb Natapov (5):
> > Get rid of deliver_bitmask.
> > Change the way how lowest priority vcpu is calculated.
> > Consolidate ioapic/ipi interrupt delivery logic.
> > ioapic/msi interrupt delivery consolidation.
> > Make kvm_apic_set_irq() deliver all kinds of interrupts.
>
> Applied and pushed, thanks.
>
> There is one issue with the new low prio selection though. Say you have
> an interrupt whose load is shared between all vcpus in the guest.
>
> The first vcpu which has its counter overflowed will then handle the int
> load by itself until it approximates to the counter of the other vcpus.
>
I took this in account. The priority counter is signed, so if say vcpu1
counter is overflows to 0x7fffffff + 1 and the vcpu2 counter is still
0x7fffffff then vcpu1 - vcpu2 = 1 and vcpu2 will be chosen to deliver
interrupts.
> Same happens with cpu hotplug.
>
For got about hotplug :(
> Not sure that the best way is to fix that. Perhaps reset all online
> vcpus to 0 on overflow/cpu-hotplug ?
>
Yes, rest counters on hotplug should work and is rare event.
> Or max the counter to a smaller value like 64 or something.
I'll try this and see how well interrupts will be spread between CPUs.
--
Gleb.
prev parent reply other threads:[~2009-03-06 6:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 14:34 [PATCH v2 0/5] ioapic/lapic/msi cleanup Gleb Natapov
2009-03-05 14:34 ` [PATCH v2 1/5] Make kvm_apic_set_irq() deliver all kinds of interrupts Gleb Natapov
2009-03-05 14:34 ` [PATCH v2 2/5] ioapic/msi interrupt delivery consolidation Gleb Natapov
2009-03-10 16:54 ` Mike Day
2009-03-11 1:42 ` Sheng Yang
2009-03-05 14:34 ` [PATCH v2 3/5] Consolidate ioapic/ipi interrupt delivery logic Gleb Natapov
2009-03-05 14:34 ` [PATCH v2 4/5] Change the way how lowest priority vcpu is calculated Gleb Natapov
2009-03-05 14:35 ` [PATCH v2 5/5] Get rid of deliver_bitmask Gleb Natapov
2009-03-05 22:34 ` [PATCH v2 0/5] ioapic/lapic/msi cleanup Marcelo Tosatti
2009-03-06 6:06 ` Gleb Natapov [this message]
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=20090306060602.GB6510@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.