From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aritoki TAKADA Subject: Re: Question: Timekeeping between Host and Guest with NTP Date: Mon, 27 Aug 2012 18:37:11 +0900 Message-ID: <503B3FC7.1090605@hitachi.com> References: <50349C7C.2070409@hitachi.com> <20120823181312.GA15127@amt.cnet> <503768F5.1000109@hitachi.com> <20120824150030.GD13206@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, ltc-kernel@ml.yrl.intra.hitachi.co.jp To: Marcelo Tosatti Return-path: Received: from mailxx.hitachi.co.jp ([133.145.228.50]:38997 "EHLO mailxx.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487Ab2H0Jj0 (ORCPT ); Mon, 27 Aug 2012 05:39:26 -0400 In-Reply-To: <20120824150030.GD13206@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Hello, (2012/08/25 0:00), Marcelo Tosatti wrote: > kvmclock driver has access to the ntpd corrected frequency of the host, but: > > 1) kvmclock time as reported to the guest uses the TSC as an offset in > addition to the host monotonic clock, TSC is susceptible to frequency > variations. > > The guest has its own timekeeping (it accumulates time from kvmclock, > at every timer interrupt). The algorithm is not > perfect, and its suspectible to small variations. > > These add up over time. > > 2) Corrections to UTC, such as leap seconds, are not reflected to the > host monotonic clock. NTP algorithm in the guest is responsible for > synchronization to UTC. I see, I understood the pitfalls of the guest only syncing to kvmclock, and now NTP on the guest seems simple and reasonable for me. Thank you again for your detailed explanation. Sincerely, --- Aritoki TAKADA aritoki.takada.jt@hitachi.com Hitachi, Ltd., Yokohama Research Laboratory