Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-16 Thread Michael S. Tsirkin
On Thu, Sep 13, 2012 at 12:36:30PM +0200, Jan Kiszka wrote: On 2012-09-13 12:33, Gleb Natapov wrote: So, this can be the foundation for direct MSI delivery as well, right? What do you mean by direct MSI delivery? kvm_irq_delivery_to_apic() is called by MSI. If you mean delivery from irq

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-16 Thread Avi Kivity
On 09/16/2012 01:56 PM, Michael S. Tsirkin wrote: On Thu, Sep 13, 2012 at 12:36:30PM +0200, Jan Kiszka wrote: On 2012-09-13 12:33, Gleb Natapov wrote: So, this can be the foundation for direct MSI delivery as well, right? What do you mean by direct MSI delivery?

[PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Gleb Natapov
Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a logical cluster irq is sent to. Signed-off-by: Gleb Natapov g...@redhat.com --- Changelog: - v2-v3 *

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Avi Kivity
On 09/13/2012 12:00 PM, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a logical cluster irq is sent to. Looks good. -- error

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Jan Kiszka
On 2012-09-13 11:00, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a logical cluster irq is sent to. Signed-off-by: Gleb Natapov

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 12:29:44PM +0200, Jan Kiszka wrote: On 2012-09-13 11:00, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Jan Kiszka
On 2012-09-13 12:33, Gleb Natapov wrote: So, this can be the foundation for direct MSI delivery as well, right? What do you mean by direct MSI delivery? kvm_irq_delivery_to_apic() is called by MSI. If you mean delivery from irq context, then yes, mst plans to do so. Yes, that's what I was

Re: [PATCHv3] KVM: optimize apic interrupt delivery

2012-09-13 Thread Michael S. Tsirkin
On Thu, Sep 13, 2012 at 12:00:59PM +0300, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a logical cluster irq is sent to.