From: "Bruce Rogers" <BROGERS@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>, xen-devel@lists.xensource.com
Subject: Re: [PATCHl] localtime basis for paravirtualized guests
Date: Wed, 21 Jun 2006 16:16:44 -0600 [thread overview]
Message-ID: <449970DB.092E.0048.1@novell.com> (raw)
In-Reply-To: <9d0d38d120a8176845142085d3822671@cl.cam.ac.uk>
No you aren't missing anything ;-) Simply providing UTC to a linux DomU
is
by far the simplest way to go, as you point out. But given that my
patch
creates the option of launching a domain with localtime as its time
base
(which P.V. NetWare needs), I'm just pointing out what we found to be
the
additional infrastructure that would be needed to get linux to work
correctly
_if_ you wanted to have it correctly work with a localtime time base.
Our SLES 10 YaST module defaults to UTC when creating linux guests,
but
the option to use localtime is also there, while the additional
infrastructure
mentioned (/dev/rtc support, etc) is, unfortunately, not. So we are
for
the moment documenting that linux guests should have their virtual
hardware clocks set to UTC, which is what most everyone would
naturally
do.
My patch solves NetWare's needs just fine, but is insufficent for
linux,
and I think a much more universal solution than what my patch
implements
is needed longer term.
- Bruce
>>> On 6/21/2006 at 3:45 PM, in message
<9d0d38d120a8176845142085d3822671@cl.cam.ac.uk>, Keir Fraser
<Keir.Fraser@cl.cam.ac.uk> wrote:
> I must be missing something. Are you saying we might want to provide
a
> domU with a localtime RTC, which it reads, offsets to UTC (because it
> knows its timezone), and then uses to set UTC time in its kernel? How
> is that better than what we do now, which is to simply provide UTC
time
> directly to the kernel, which it can then convert to localtime itself
> when that's appropriate?
>
> -- Keir
>
> On 21 Jun 2006, at 22:23, Bruce Rogers wrote:
>
>> The way Linux gets its UTC time when it is running from a locatime
>> time base is that hwclock is called from the init scripts and it
reads
>> /dev/rtc, offsets that value by the local time offset, and resets
the
>> kernel's time via the settimeofday system call. So if /dev/rtc was
>> tied straight into the time retrieved from Xen (speaking of the
>> DomU case) this all works correctly to reset the kernel's sense
>> of time to be UTC. As it stands today, hwclock fails because
>> neither /dev/rtc nor direct access to the RTC via port I/O is
>> there for a DomU.
>>
>> Without the above actions taking place, the kernel is left
>> using localtime (from Xen) as if it was UTC, and the
>> localtime derived from that is off. I've got the rtc.c code
>> hacked up to make it work but before I proceeded down that
>> path further, was interested in hearing what others thought
>> might be the best solution for allowing guests to use Xen as
>> a time basis, but be more flexible with managing its own time.
>>
>> - Bruce
>>
>>>>> On 6/21/2006 at 10:11 AM, in message
>> <220a261ede8f0089ecc6a7c408cea2b8@cl.cam.ac.uk>, Keir Fraser
>> <Keir.Fraser@cl.cam.ac.uk> wrote:
>>
>>> On 21 Jun 2006, at 00:20, Bruce Rogers wrote:
>>>
>>>> I should point out however that this by itself does not allow a
>>>> localtime
>>>> time base to be used for xenolinux. That support would require
>>>> additional
>>>> changes to Linux (eg a Xen aware implementation of /dev/rtc &
>> etc.),
>>>> and
>>>> should probably be based on a more flexible and thorough
>> implementation
>>>> of
>>>> non-UTC guest time bases than what this patch provides.
>>>
>>> I'm not sure what you mean here. If Xen adds an offset to wc_sec
then
>>
>>> XenLinux will see a different wallclock time. Right? RTC isn't
>> emulated
>>> or used by domUs.
>>>
>>> -- Keir
prev parent reply other threads:[~2006-06-21 22:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 3:40 wallclock time for paravirtualized guests Ian Pratt
2006-03-28 15:28 ` Bruce Rogers
2006-03-28 15:33 ` Keir Fraser
2006-03-31 20:22 ` [PATCHl] localtime basis " Bruce Rogers
2006-03-31 20:30 ` Muli Ben-Yehuda
2006-03-31 20:41 ` Bruce Rogers
2006-04-05 14:03 ` Keir Fraser
2006-04-05 14:30 ` Bruce Rogers
2006-06-20 23:20 ` Bruce Rogers
2006-06-21 15:29 ` B Thomas
2006-06-21 15:49 ` Keir Fraser
2006-06-21 16:01 ` Keir Fraser
2006-06-21 16:59 ` B Thomas
2006-06-21 16:11 ` Keir Fraser
2006-06-21 21:23 ` Bruce Rogers
2006-06-21 21:45 ` Keir Fraser
2006-06-21 22:16 ` Bruce Rogers [this message]
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=449970DB.092E.0048.1@novell.com \
--to=brogers@novell.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.