From: Glauber Costa <glommer@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] keep guest wallclock in sync with host clock
Date: Wed, 2 Sep 2009 09:48:39 -0300 [thread overview]
Message-ID: <20090902124839.GM30340@mothafucka.localdomain> (raw)
In-Reply-To: <4A9E63FA.8040808@redhat.com>
On Wed, Sep 02, 2009 at 03:24:26PM +0300, Avi Kivity wrote:
> 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.
But then you can be scheduled after you did settimeofday, but before reading
kvmclock again. Since we're aiming for periodic adjustments here,
any discrepancies should not last long, so we can maybe live with it.
next prev parent reply other threads:[~2009-09-02 12:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 11:50 [PATCH 0/2] Automatically grab wallclock time updates from hypervisor Glauber Costa
2009-09-01 11:50 ` [PATCH 1/2] keep guest wallclock in sync with host clock Glauber Costa
2009-09-01 11:50 ` [PATCH 2/2] add sysctl for kvm wallclock sync Glauber Costa
2009-09-02 6:54 ` Chris Lalancette
2009-09-02 11:31 ` Glauber Costa
2009-09-02 11:40 ` Avi Kivity
2009-09-02 11:44 ` [PATCH 1/2] keep guest wallclock in sync with host clock Avi Kivity
2009-09-02 12:21 ` Glauber Costa
2009-09-02 12:24 ` Avi Kivity
2009-09-02 12:48 ` Glauber Costa [this message]
2009-09-02 12:56 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090902124839.GM30340@mothafucka.localdomain \
--to=glommer@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®