[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CE5257B.60206@redhat.com>
Date: Thu, 18 Nov 2010 15:09:15 +0200
From: Avi Kivity <avi@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
CC: Marcelo Tosatti <mtosatti@...hat.com>,
Gleb Natapov <gleb@...hat.com>,
Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
Gregory Haskins <ghaskins@...ell.com>,
Chris Lalancette <clalance@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] kvm: fast-path msi injection with irqfd
On 11/18/2010 03:03 PM, Michael S. Tsirkin wrote:
> > > int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level);
> > >+int kvm_set_msi(struct kvm_kernel_irq_routing_entry *irq_entry, struct kvm *kvm,
> > >+ int irq_source_id, int level);
> >
> > No point in the level argument for an msi specific function.
>
> This is an existing function I made non-static.
> We have per-gsi callbacks so level is required there to match.
Right.
> I could add a wrapper I guess:
>
> int kvm_set_msi(struct kvm_kernel_irq_routing_entry *irq_entry, struct kvm *kvm,
> int irq_source_id, int level)
> {
> if (!level)
> return -1;
> return kvm_send_msi(irq_entry, kvm, irq_source_id);
> }
>
> This results in less code for irqfd but more code for ioctl injection
> ... is it worth it?
IMO not.
> >
> > Apart from these minor issues, looks good.
>
>
> Something we should consider improving is the loop over all VCPUs that
> kvm_irq_delivery_to_apic invokes. I think that (for non-broadcast
> interrupts) it should be possible to precompute an store the CPU
> in question as part of the routing entry.
> Something for a separate patch ... comments?
Yes. Either precompute, or compute on first use and cache. Precompute
is more realtime-friendly so I prefer it.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists