From: Glauber Costa <gcosta@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, andi-suse@firstfloor.org,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 0/4] paravirt clock patches
Date: Fri, 09 May 2008 10:25:15 -0300 [thread overview]
Message-ID: <482450BB.3050409@redhat.com> (raw)
In-Reply-To: <20080508231045.GA6429@dmt>
Marcelo Tosatti wrote:
> On Wed, May 07, 2008 at 08:45:12PM +0200, Gerd Hoffmann wrote:
>> Ok folks, here is the band aid fix for testing from the odd bugs
>> department. Goes on top of the four patches of this series. A real,
>> clean solution is TBD. Tomorrow I hope (some urgent private problems
>> are in the queue too ...).
>>
>> Problem is the per-cpu area for cpu 0 has two locations in memory, one
>> before and one after pda initialization. kvmclock registers the first
>> due to being initialized quite early, and the paravirt clock for cpu 0
>> stops seeing updates once the pda setup is done. Which makes the TSC
>> effectively the base for timekeeping (instead of using the TSC for
>> millisecond delta adjustments only). Secondary CPUs work as intended.
>>
>> This obviously screws up timekeeping on SMP guests, especially on hosts
>> with unstable TSC.
>>
>> happy testing,
>
> Gerd,
>
> SMP guests can boot and seem stable. Thanks!
>
There are also other cases that suffer from the same problem: living
in a per-cpu area before setup_per_cpu_area is done, and thus, having to
update the addresses later on. arch/x86/kernel/setup.c has an example of
such code, the apicid mappings.
With one more user of it arriving, as a result of something that turned
out to be a hard to find issue, I'm starting to get the feeling that we
can do better than this, on the overall.
Looking quickly at the code, it seems to me that moving the per-cpu
initialization earlier is not possible, or at least, not trivially possible.
So maybe declare the per-cpu areas in a special section, then in
setup_per_cpu_areas, copy them into the definitive per-cpu section and
update the callers?
What do you think?
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-05-09 13:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 8:37 [PATCH 0/4] paravirt clock patches Gerd Hoffmann
2008-04-24 8:37 ` [PATCH 1/4] Add helper functions for paravirtual clocksources Gerd Hoffmann
2008-04-24 8:37 ` [PATCH 2/4] Make xen use the generic paravirt clocksource code Gerd Hoffmann
2008-04-24 8:37 ` [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen Gerd Hoffmann
2008-04-24 8:37 ` [PATCH 4/4] kvm/guest: fix paravirt clocksource to be compartible " Gerd Hoffmann
2008-04-24 13:16 ` Glauber Costa
2008-04-24 13:11 ` [PATCH 1/4] Add helper functions for paravirtual clocksources Glauber Costa
2008-04-28 8:54 ` Gerd Hoffmann
2008-04-27 12:58 ` [PATCH 0/4] paravirt clock patches Avi Kivity
2008-04-28 12:09 ` Gerd Hoffmann
2008-04-28 19:28 ` Marcelo Tosatti
2008-05-05 7:47 ` Gerd Hoffmann
2008-05-05 15:32 ` Marcelo Tosatti
2008-05-06 15:59 ` Gerd Hoffmann
2008-05-06 16:44 ` Gerd Hoffmann
2008-05-07 18:45 ` Gerd Hoffmann
2008-05-08 23:10 ` Marcelo Tosatti
2008-05-09 13:25 ` Glauber Costa [this message]
2008-05-13 6:53 ` Gerd Hoffmann
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=482450BB.3050409@redhat.com \
--to=gcosta@redhat.com \
--cc=andi-suse@firstfloor.org \
--cc=kraxel@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox