[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] remove HVM halt timer


  • To: "Li, Xin B" <xin.b.li@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AccEnswNUkAD/BhaQT+W4uZ/emiWdAAAYqyKAABK//AAAKXPCw==
  • Thread-topic: [Xen-devel] [PATCH] remove HVM halt timer

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.