|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [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
|
|
|
|
|