All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kouya Shimura <kouya@jp.fujitsu.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] x86 hvm: freeze PIT/LAPIC timer emulation while its IRQ is masked
Date: Thu, 10 Sep 2009 17:22:34 +0900	[thread overview]
Message-ID: <7kfxav6wfk.fsf@pingu.sky.yk.fujitsu.co.jp> (raw)
In-Reply-To: <C6CE5FF0.14561%keir.fraser@eu.citrix.com>

Well, this patch has two aims.  One is to stop the xen's timer by
stop_timer(). And another is to simplify pt_update_irq() which
searches the earliest platform timer.

To answer the latter aim, this patch gets rid of unused (masked
by IRQ) platform timer from vcpu->arch.hvm_vcpu.tm_list.
Your suggestion satisfies the first but the latter, I think.
Besides, pt_update_irq() is more critical since it is called on
every VM_EXIT.

Although I understand your uneasiness, is there any other way?

Thanks,
Kouya

Keir Fraser writes:
> Although I can see the sense here, the patch makes me a bit uneasy. Also I
> think neater code would result from simply making vpt.c's handling of
> periodic timers less stupid. By this I mean that calling set_timer() from
> the timer handler is not really necessary -- you already know an interrupt
> is now pending and the vcpu is kicked. May as well not set_timer() until the
> pending interrupt(s) are delivered. That would then effectively get your
> optimisation "for free", wouldn't it?
> 
>  -- Keir
> 
> On 10/09/2009 06:47, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:
> 
> > Hi,
> > 
> > I've found that modern windows OS never use the PIT timer,
> > and neither cpu#0's LAPIC timer after boot.
> > Despite that, xen emulates them busily. It's inefficient.
> > 
> > Note: this patch ignores the IRQ mask of legacy i8259 since
> > rombios frequently modifies it.
> > 
> > Thanks,
> > Kouya
> > 
> > Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
> > 
> 

  reply	other threads:[~2009-09-10  8:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10  5:47 [PATCH] x86 hvm: freeze PIT/LAPIC timer emulation while its IRQ is masked Kouya Shimura
2009-09-10  6:49 ` Keir Fraser
2009-09-10  8:22   ` Kouya Shimura [this message]
2009-09-10  8:32     ` Keir Fraser
2009-09-10  9:54       ` Kouya Shimura
2009-09-10 12:32         ` Keir Fraser
2009-09-16  6:46           ` Kouya Shimura
2009-09-16  6:50             ` [PATCH 1/2] x86 hvm: don't set periodical timer again until its IRQ is delivered Kouya Shimura
2009-09-16  6:53               ` [PATCH 2/2] x86 hvm: suspend platform timer emulation while its IRQ is masked Kouya Shimura
2009-09-16  7:40             ` [PATCH] x86 hvm: freeze PIT/LAPIC " Keir Fraser
2009-09-16  8:00               ` Cui, Dexuan
2009-09-16  8:20                 ` Keir Fraser
2009-09-16  8:40                   ` Cui, Dexuan
2009-09-16  9:09                     ` Keir Fraser
2009-09-16  8:28                 ` Kouya Shimura
2009-09-16  8:36                   ` Keir Fraser
2009-09-11 12:07 ` Konrad Rzeszutek Wilk
2009-09-14  5:58   ` Kouya Shimura

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=7kfxav6wfk.fsf@pingu.sky.yk.fujitsu.co.jp \
    --to=kouya@jp.fujitsu.com \
    --cc=keir.fraser@eu.citrix.com \
    --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.