Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbZIBMY3 (ORCPT ); Wed, 2 Sep 2009 08:24:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751422AbZIBMY2 (ORCPT ); Wed, 2 Sep 2009 08:24:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52226 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbZIBMY1 (ORCPT ); Wed, 2 Sep 2009 08:24:27 -0400 Message-ID: <4A9E63FA.8040808@redhat.com> Date: Wed, 02 Sep 2009 15:24:26 +0300 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: Glauber Costa CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] keep guest wallclock in sync with host clock 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> In-Reply-To: <20090902122144.GL30340@mothafucka.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 26 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/