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] remove HVM halt timer

To: "Li, Xin B" <xin.b.li@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] remove HVM halt timer
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 10 Nov 2006 08:42:06 +0000
Delivery-date: Fri, 10 Nov 2006 00:42:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <B30DA1341B0CFA4893EF8A36B40B5C5D62EA5D@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccEnswNUkAD/BhaQT+W4uZ/emiWdAAAYqyKAABK//AAAKXPCw==
Thread-topic: [Xen-devel] [PATCH] remove HVM halt timer
User-agent: Microsoft-Entourage/11.2.5.060620
On 10/11/06 8:34 am, "Li, Xin B" <xin.b.li@xxxxxxxxx> wrote:

>> Why do you replace use of the schedop_block hypercall with
>> direct setting of the blocked flag and softirq?
> 
> Currently there are 3 points where vmx may gets schuduled out:
> 1) just before vmentry in exits.S
> 2) wait_on_xen_event_channel in hvm_do_resume, but I think now it's
> never reachable.
> 3) in hvm_hlt.
> Actually 3 can be merged into 1, and we can do some statistic jobs
> there.
> See prepare_wait_on_xen_event_channel, it's the same way.

The advantage of the blocking hypercall is that it safely checks
local_events_need_delivery() before actually blocking. This is necessary to
avoid wakeup-waiting races. Now, this doesn't actually work for HVM guests
(yet) as it checks the wrong condition (event-channel upcall flag rather
than state of the PIC/LAPIC) *but* it will mean that when the
local_events_need_delivery() macro is fixed, the blocking hypercall will
automatically do the right thing for us. The blocking code in your patch
will not.

If you want to collect stats when you're scheduled out, the correct place to
do that is context_switch(). But we already collect generic scheduler stats
and generate trace entries. What else might be of interest?

 -- Keir



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