From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests] KVM: x86: add hyperv clock test case Date: Thu, 28 Jan 2016 22:28:27 +0100 Message-ID: <56AA87FB.40601@redhat.com> References: <1453989899-30351-1-git-send-email-pbonzini@redhat.com> <56AA24EB.6000504@virtuozzo.com> <56AA2AB6.3000802@redhat.com> <20160128185350.GC29344@rkaganb.sw.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: Roman Kagan , asmetanin@virtuozzo.com, kvm@vger.kernel.org, "Denis V. Lunev" , Marcelo Tosatti Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:35064 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755826AbcA1V2d (ORCPT ); Thu, 28 Jan 2016 16:28:33 -0500 Received: by mail-wm0-f66.google.com with SMTP id l66so6237376wml.2 for ; Thu, 28 Jan 2016 13:28:32 -0800 (PST) In-Reply-To: <20160128185350.GC29344@rkaganb.sw.ru> Sender: kvm-owner@vger.kernel.org List-ID: On 28/01/2016 19:53, Roman Kagan wrote: >> > Still, the drift that I get on my machine is really excessive, and I >> > should look into it more. Marcelo, does it ring a bell? Any reason why >> > get_kernel_ns() would be more precise than kvmclock? The computer has >> > been up only for about 25 hours. > Are you running an ntp client on the host by chance? > > get_kernel_ns() goes through timekeeper, and it may have slightly > different idea of the tsc rate than tsc_khz calculated early at boot. I get the same result both with and without chrony running (though in one case the actual tsc_khz is greater than the initial measurement, and in the other case it is smaller). Paolo