public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Sheng" <sheng.yang@intel.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/6] KVM: In kernel pit model
Date: Fri, 7 Mar 2008 16:12:11 +0800	[thread overview]
Message-ID: <200803071612.12182.sheng.yang@intel.com> (raw)
In-Reply-To: <200803061741.03249.sheng.yang@intel.com>

On Thursday 06 March 2008 17:41:03 Yang, Sheng wrote:
> On Thursday 06 March 2008 16:43:18 Yang, Sheng wrote:
> > On Thursday 06 March 2008 16:06:51 Avi Kivity wrote:
> > > Yang, Sheng wrote:
> > > > Here is the updated patch. I kept 0xff because I think it's OK for
> > > > understand easily. :)
> > >
> > > Any news on the regression with older Linux guests?  That's the only
> > > thing keeping my from applying the patchset.
> >
> > Not much. PIT interrupts injection is all right, 1000 per second. Just
> > found two clock source in guest got problem: PM timer and TSC. Seems both
> > due to compensate for lost ticks. Get rid of something like "jiffies_64
> > += lost -1" get the time ok.
> >
> > And I think it's a exist bug. As you see, in most condition, userspace
> > pit + in kernel irqchip resulted in time flow slowly, due to the lost of
> > interrupts. But RHEL4 runs even faster than host...
> >
> > I will do more investigate.
>
> Get some clues.
>
> It seems like for the kernel which is active to inject lost interrupt, when
> some PIT interrupts were pending, the TSC/other clocksource got the wrong
> impression that some PIT interrupt lost, then using itself's counter to
> adjust the jiffies. So the problem occurs.
>
> Xen adjust TSC to fit this mode. It pull TSC backward to get the correct
> value when injecting one PIT interrupt. But this would causing trouble on
> some Windows. Then, it got the "time mode" concept...

Found more complex for KVM. Xen pulled pm timer down to kernel part, and used 
the guest TSC as source. So only adjust TSC is OK for it. But we are still 
using pm timer in QEmu, which using host time as source. So even we pull back 
TSC, the problem still exists, for 2.6.9 prefer to pm timer by default.

-- 
Thanks
Yang, Sheng

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-03-07  8:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 10:22 [PATCH 1/6] KVM: In kernel pit model Yang, Sheng
2008-03-05  6:54 ` Avi Kivity
2008-03-05  7:04   ` Yang, Sheng
2008-03-05  9:15     ` Ingo Molnar
2008-03-05 11:35       ` Yang, Sheng
2008-03-05 11:43         ` Avi Kivity
2008-03-05 12:24         ` Ingo Molnar
2008-03-06  7:56         ` Yang, Sheng
2008-03-06  8:06           ` Avi Kivity
2008-03-06  8:43             ` Yang, Sheng
2008-03-06  9:41               ` Yang, Sheng
2008-03-07  8:12                 ` Yang, Sheng [this message]
2008-03-07  8:53                   ` Avi Kivity
2008-03-07  9:14                     ` Yang, Sheng
2008-03-07  9:57                       ` Avi Kivity
2008-03-06  9:14           ` Ingo Molnar
2008-03-06  9:25             ` Yang, Sheng
2008-03-06 12:33               ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2008-03-07 12:52 [PATCH 1/6] KVM: In kernel PIT model Yang, Sheng

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=200803071612.12182.sheng.yang@intel.com \
    --to=sheng.yang@intel.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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