From: Andi Kleen <andi@firstfloor.org>
To: Alok Kataria <akataria@vmware.com>
Cc: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
the arch/x86 maintainers <x86@kernel.org>,
Daniel Hecht <dhecht@vmware.com>
Subject: Re: [PATCH] Skip tsc synchronization checks if CONSTANT_TSC bit is set.
Date: Thu, 23 Oct 2008 10:10:52 +0200 [thread overview]
Message-ID: <20081023081052.GI27492@one.firstfloor.org> (raw)
In-Reply-To: <1224728478.13953.79.camel@alok-dev1>
> >
> > Or are you saying time is always broken on VMware & Linux?
>
> The acpi_pm timer wrap problem has come up only with the clocksource and
> NO_HZ kernels, without NO_HZ there were periodic interrupts which caused
> the guest to be scheduled before ACPI_PM could wrap around.
ACPI_PM should be just fixed. My old independent noidlehz implementation
just always limited the sleep times to half the wrap time of the
timer. I suspect this needs to be done here too.
>
> > > So TSC is the ideal clocksource from performance and correctness point
> > > of view for VMware.
> >
> > But you don't seem to emulate it "ideal"ly otherwise you wouldn't
> > need all these hacks you're adding?
>
> "All these hacks" ? i guess you are talking about only this particular,
Everything that requires vmware detection means your hardware
emulation is not good enough.
> skipping the tsc_sync checks.
> Rest of them are valid bugs as i have mentioned.
The tsc frequency one didn't sound like a valid bug.
> > or implement
> > a real vmware PV timer and just say it's PV and not fully virtualized.
> > But doesn't the vmware paravirt ops have that already anyways?
>
> That's for 32bit only.
I though there were some efforts to make it 64bit too?
Or is there no VMI ROM on 64bit? Perhaps you could do the
timer without the ROM then.
> Apart from the tsc_sync problem i doubt we have
> any other issue with the TSC as clocksource, so adding a similar
> clocksource is something that i would avoid.
>
> >
> > But I personally think it wouldn't really scale to add detection for
> > more and more "nearly PV" hypervisors to the standard native kernel.
>
> I think we anyways need a way to detect if we are running on a
> hypervisor.
For PV sure. But not for non PV.
> That's the only way we can move towards having a single
> image which runs well on both native hardware and a virtualized
> environment.
If a hypervisor is not good enough to simulate hardware closely
enough it should just set up respective paravirt ops (or register
own clock drivers etc.), but not complicate the native code with a weird
half PV half fully emulated mix.
>
> I guess, the only thing that you don't agree over here is the enabling
> of CONSTANT_TSC bit when VMware is detected, right ?
My POV is that code supposed to drive real hardware shouldn't
have any "is hypervisor X|Y|Z" hacks. We already got a whole
lot of infrastructure for PV hypervisors.
For tsc_sync I suspect the fix is to either completely trust CONSTANT_TSC
or make the check accept more offset or possibly a combination of both.
-Andi
--
ak@linux.intel.com
next prev parent reply other threads:[~2008-10-23 8:03 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 1:35 [PATCH 0/3] Improve TSC as a clocksource under VMware Alok Kataria
2008-10-21 5:55 ` Chris Snook
2008-10-21 19:11 ` Alok Kataria
2008-10-22 19:26 ` Alok Kataria
2008-10-22 19:29 ` Jeff Hansen
2008-10-21 9:43 ` Andi Kleen
2008-10-21 16:41 ` Alok Kataria
2008-10-21 17:40 ` Andi Kleen
2008-10-21 18:04 ` Alok Kataria
2008-10-21 18:15 ` Andi Kleen
2008-10-21 19:10 ` Alok Kataria
2008-10-21 19:27 ` Andi Kleen
2008-10-21 19:47 ` Alok Kataria
2008-10-21 21:41 ` Alok Kataria
2008-10-22 19:23 ` [PATCH] Skip tsc synchronization checks if CONSTANT_TSC bit is set Alok Kataria
2008-10-22 19:26 ` Ingo Molnar
2008-10-22 19:30 ` Alok Kataria
2008-10-22 20:17 ` Andi Kleen
2008-10-22 22:04 ` Alok Kataria
2008-10-22 19:58 ` Andi Kleen
2008-10-22 22:00 ` Alok Kataria
2008-10-22 22:13 ` Andi Kleen
2008-10-22 22:11 ` Alok Kataria
2008-10-22 22:54 ` Andi Kleen
2008-10-23 2:21 ` Alok Kataria
2008-10-23 8:10 ` Andi Kleen [this message]
2008-10-23 23:39 ` Alok Kataria
2008-10-23 23:47 ` H. Peter Anvin
2008-10-24 0:25 ` Andi Kleen
2008-10-24 0:46 ` H. Peter Anvin
2008-10-24 7:23 ` Andi Kleen
2008-10-24 15:30 ` H. Peter Anvin
2008-10-24 19:25 ` Andi Kleen
2008-10-24 19:19 ` H. Peter Anvin
2008-10-24 19:34 ` Andi Kleen
2008-10-24 19:50 ` Alok Kataria
2008-10-24 20:18 ` Dan Hecht
2008-10-24 1:12 ` Alok Kataria
2008-10-24 1:18 ` H. Peter Anvin
2008-10-22 22:15 ` Alan Cox
2008-10-22 22:17 ` Alok Kataria
2008-10-21 9:50 ` [PATCH 0/3] Improve TSC as a clocksource under VMware Pavel Machek
2008-10-21 16:48 ` Alok Kataria
2008-10-21 18:36 ` Pavel Machek
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=20081023081052.GI27492@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akataria@vmware.com \
--cc=dhecht@vmware.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@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