From: Zachary Amsden <zach@vmware.com>
To: Chris Wright <chrisw@sous-sol.org>
Cc: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@muc.de>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dan Hecht <dhecht@vmware.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 9/10] Vmi timer update.patch
Date: Wed, 11 Apr 2007 18:19:27 -0700 [thread overview]
Message-ID: <461D891F.1060309@vmware.com> (raw)
In-Reply-To: <20070410172429.GN10574@sequoia.sous-sol.org>
Chris Wright wrote:
> * Zachary Amsden (zach@vmware.com) wrote:
>
>>>> +void __init vmi_time_init(void)
>>>> +{
>>>> + /* Disable PIT: BIOSes start PIT CH0 with 18.2hz peridic. */
>>>> + outb_p(0x3a, PIT_MODE); /* binary, mode 5, LSB/MSB, ch 0 */
>>>>
>>> That shouldn't be necessary using clockevents.
>>>
>> Actually, I'm not so sure. If clockevents simply masks the PIT when
>> disabling it, we still have overhead of keeping the latch in sync, which
>> requires a timer at the PIT frequency. I can instrument to see how
>> exactly the PIT gets disabled.
>>
>
> It should switch from pit to vmi-timer, and the switch should do the state
> transistions on pit to go to unused mode.
>
Ok, here's why we need it: the reason is even more basic. PIT
clockevents never get setup; the time_init paravirt-op makes it
conditional whether the PIT or VMI timer get invoked. But our BIOS
still sets it up to run at 18.2 HZ, like any good BIOS would. We need
the disable hack, in fact it is actually a good thing to do for native
hardware. Why leave the PIT enabled with junk programming from the BIOS
once we are in the protected mode kernel? Eventually, on hardware that
doesn't want to use the PIT at all, this might be wanted to conserve
power (casually joking but potentially correct argument).
Zach
prev parent reply other threads:[~2007-04-12 1:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 0:06 [PATCH 9/10] Vmi timer update.patch Zachary Amsden
2007-04-10 2:37 ` Chris Wright
2007-04-10 17:03 ` Zachary Amsden
2007-04-10 17:24 ` Chris Wright
2007-04-10 21:57 ` Zachary Amsden
2007-04-10 22:16 ` Jeremy Fitzhardinge
2007-04-10 22:28 ` Zachary Amsden
2007-04-10 22:38 ` Chris Wright
2007-04-10 22:28 ` Chris Wright
2007-04-10 22:59 ` Zachary Amsden
2007-04-12 1:19 ` Zachary Amsden [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=461D891F.1060309@vmware.com \
--to=zach@vmware.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=dhecht@vmware.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.osdl.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;
as well as URLs for NNTP newsgroup(s).