From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] keep guest wallclock in sync with host clock Date: Wed, 02 Sep 2009 15:24:26 +0300 Message-ID: <4A9E63FA.8040808@redhat.com> References: <1251805848-17451-1-git-send-email-glommer@redhat.com> <1251805848-17451-2-git-send-email-glommer@redhat.com> <4A9E5A8B.4060804@redhat.com> <20090902122144.GL30340@mothafucka.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Glauber Costa Return-path: In-Reply-To: <20090902122144.GL30340@mothafucka.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/02/2009 03:21 PM, Glauber Costa wrote: > >>> +static void kvm_sync_wall_clock(struct work_struct *work) >>> +{ >>> + struct timespec now; >>> + >>> + kvm_get_wall_ts(&now); >>> >>> >> What happens if we schedule here? >> > hummm, I guess disabling preemption would be enough to make us safe here? > You can't prevent host preemption. You might read kvmclock again and repeat if too much time has passed. -- error compiling committee.c: too many arguments to function