From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH V2 4/4] Utilize the vmx preemption timer for tsc deadline timer Date: Thu, 26 May 2016 09:20:56 +0200 Message-ID: <6de080a0-fc63-71b8-355d-678e007c89a5@redhat.com> References: <1464128852-14138-1-git-send-email-yunhong.jiang@linux.intel.com> <1464128852-14138-5-git-send-email-yunhong.jiang@linux.intel.com> <20160524163556.462c3309@jnakajim-build> <20160525155324.16ed5f0c@jnakajim-build> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: David Matlack , kvm list , Marcelo Tosatti , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li To: yunhong jiang Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:36667 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbcEZHVL (ORCPT ); Thu, 26 May 2016 03:21:11 -0400 Received: by mail-wm0-f67.google.com with SMTP id q62so2482633wmg.3 for ; Thu, 26 May 2016 00:21:10 -0700 (PDT) In-Reply-To: <20160525155324.16ed5f0c@jnakajim-build> Sender: kvm-owner@vger.kernel.org List-ID: On 26/05/2016 00:53, yunhong jiang wrote: > Hmm, I can fix this on my next submission. Or someone can send out a separate > patch for it. Alan Jenkins is looking at it in another thread. >> > 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? now is nanoseconds, coming from struct hrtimer_clock_base. ns is nanoseconds, computed from (tscdeadline - guest_tsc) * 1000000 / vcpu->arch.virtual_tsc_khz. Thanks, Paolo