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

RE: [Xen-devel] [PATCH] Pin vcpu for VMX domain


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
  • From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
  • Date: Wed, 8 Feb 2006 20:58:00 +0800
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 08 Feb 2006 13:09:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcYslZTrjzlHFlZBT8OYZwDFFMNCPAAF49nQ
  • Thread-topic: [Xen-devel] [PATCH] Pin vcpu for VMX domain

 
>Rather than calling vmx_remove_timers() from your SMP call function, 
>can you not just call it from vmx_reinstall_timers()? 

I'm not sure if it will has some corner case, and hope your
clarification for it.
considering following situation, assume the VMX switch from cpu 0->cpu1
1) on cpu0, the timer interrupt happened, so timer_softirq_action is
called, the pit_timer_fn is called, and in pit_timer_fn, it will try to
set the  pit timer again.
2) before pit_timer_fn set the pit timer on cpu0, the stop_timer is
called on cpu1 on vmx_reinstall_timers. 
3) after stop_timer finished, the pit_timer_fn on cpu0 set the ac_timer
on cpu0.

on this situation, the stop_timer on cpu1 will has no effect. And then
the init_timer may cause error situation.

In fact, I think the old patch itself is not safe on this situation,
since the stop_timer is called on IPI interrupt , which may run when the
pit_timer_fn is running.



>You explain why 
>the pit and hlt timers do not need to be re-activated in 
>vmx_reinstall_timer() -- what about the APIC timer?
>

The APIC timer should be same to PIT timer in future and a patch is
needed for this, I had a comments for it and deleted when clean coding
style.

Thanks
Yunhong Jiang

>There's no need to check active_timer() before calling stop_timer() -- 
>stop_timer does the check for you.
>
>  -- 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®.