lkml.org 
[lkml]   [2017]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay
From
Date


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

\
 
 \ /
  Last update: 2017-06-29 14:14    [W:0.077 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site