Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay

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

 




On 29/06/2017 14:05, Wanpeng Li wrote:
> +            /* In case the sw timer triggered in the window */
> +            if (!apic_lvtt_period(apic)) {
> +                if (r || atomic_read(&apic->lapic_timer.pending)) {
> +                    need_cancel = true;
> +                    if (r)
> +                    apic_timer_expired(apic);
> +                }
> +            }

Yes, that's equivalent.  The compiler should thread the jumps as if it were:

	if (r) {
		apic_timer_expired(apic);
		goto cancel_timer;
	}
	if (atomic_read(&apic->lapic_timer.pending))
		goto cancel_timer;

so it produces pretty good code too.

Paolo



[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