Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 05, 2012 at 12:30:49PM -0700, Eric Northup wrote:
> On Sun, Aug 5, 2012 at 5:58 AM, Gleb Natapov <gleb@xxxxxxxxxx> wrote:
> > APIC code has a lot of checks for apic presence and apic HW/SW enable
> > state.  Most common configuration is when each vcpu has in kernel apic
> > and it is fully enabled. This path series uses jump labels to turn checks
> > to nops in the common case.
> 
> What is the target workload and how does the performance compare?
Since those patches micro optimize interrupt injection path workload
with a lot of interrupts and a lot of cpus is the target workload. I
ran a simple test that transfers big file from gust (with 16 vcpus)
to a host. The workload generates ~40000 interrupt per second (this is
with userspace networking). Using perf I checked how functions affected
by the change perform with and without the patches:

Without:
0.85% kvm_apic_present
0.45% __apic_accept_irq
0.30% kvm_apic_has_interrupt
0.20% kvm_irq_delivery_to_apic
0.16% apic_has_pending_timer
0.09% apic_mmio_write
0.04% kvm_apic_accept_pic_intr
0.04% kvm_lapic_get_cr8
0.04% kvm_lapic_enabled

With:
0.61%   kvm_irq_delivery_to_apic
0.49%   __apic_accept_irq
0.12%   apic_has_pending_timer
0.11%   kvm_apic_has_interrupt
0.04%   kvm_apic_accept_pic_intr
0.03%   apic_mmio_write
0.02%   kvm_lapic_get_cr8

>                                                                    As
> a naive question, how different is it than just using gcc branch
> hints?
> 
If I add likely() annotations to kvm_apic_present() gcc generates
exactly same code.

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux