Re: [RFC PATCH V2 4/4] Utilize the vmx preemption timer for tsc deadline timer

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

 



On Wed, 25 May 2016 13:58:17 +0200
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:

> 
> 
> On 25/05/2016 01:35, yunhong jiang wrote:
> >> > Does this interact correctly with TSC scaling? IIUC this
> >> > programs the VMX preemption timer with a delay in guest cycles,
> >> > rather than host cycles.
> > Aha, good point, thanks!
> > 
> > But I re-checked the lapic.c and seems this issue has never been
> > considered? Check
> > http://lxr.free-electrons.com/source/arch/x86/kvm/lapic.c#L1335 
> 
> This is a bug indeed.  The simplest fix would be to ignore
> lapic_timer_advance_ns when TSC scaling is in use.

Hmm, I can fix this on my next submission. Or someone can send out a separate
patch for it.

> 
> > and lxr.free-electrons.com/source/arch/x86/kvm/lapic.c#L1335
> 
> You copied the wrong URL, but at least lines 1383-1410 seem okay to
> me.

Yes, I mean 1383~1410. On L1402, "expire = ktime_add_ns(now, ns)", I think the
"now" is host tsc while "ns" is guest delta tsc, which seems a bug to me. Or I
miss-understand anything?

Thanks
--jyh

> 
> > for example. Also I
> > tried to find a function to translate guest tsc to host tsc and
> > didn't find such function at all.
> 
> See my other reply.
> 
> Thanks,
> 
> Paolo

--
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