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

Re: [Xen-devel] [PATCH v2 3/3] x86/vlapic: Apply change to TDCR right away to the timer



On Thu, Aug 03, 2017 at 09:29:02AM -0600, Jan Beulich wrote:
> >>> Anthony PERARD <anthony.perard@xxxxxxxxxx> 07/18/17 7:10 PM >>>
> >@@ -701,6 +702,13 @@ static void vlapic_update_timer(struct vlapic *vlapic, 
> >uint32_t lvtt);
> >delta = period - time_passed;
> >}
>  >
> >+    if ( vlapic->hw.timer_divisor != old_divisor )
> >+    {
> >+        period = (uint64_t)vlapic_get_reg(vlapic, APIC_TMICT)
> >+            * APIC_BUS_CYCLE_NS * vlapic->hw.timer_divisor;
> >+        delta = delta * vlapic->hw.timer_divisor / old_divisor;
> >+    }
> 
> Isn't this calculation pointless when delta is zero?

Yeah, I guess it is. I'll move this if block into the next one, which is
if (delta && X).

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.