WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86 hvm: freeze PIT/LAPIC timer emulation while

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86 hvm: freeze PIT/LAPIC timer emulation while its IRQ is masked
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Thu, 10 Sep 2009 18:54:10 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Sep 2009 02:54:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6CE784B.14580%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7kfxav6wfk.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx> <C6CE784B.14580%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Keir Fraser writes:
> Do you get a measurable performance win from this patch?

Sorry, I don't measure yet. Probably a little bit win.

> Not using pt_irq_masked() seems odd. Is it to avoid 859 IRQ mask checks, and
> if so why are you doing that? Why do we care that rombios twiddles the 8259
> masks a bunch during boot?

I guessed that the cost of freezing/thawing a timer with the 8259 mask
is higher than timer emulation.  And the PIT timer is actually active
while rombios masks the 8259.

If using pt_irq_masked() is desirable, I'll remake it.

Thanks,
Kouya

> 
>  -- Keir
> 
> On 10/09/2009 09:22, "Kouya Shimura" <kouya@xxxxxxxxxxxxxx> wrote:
> 
> > 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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
> >>> 
> >> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>