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

RE: [Xen-devel] [PATCH 6/10] Allow vcpu to pause self


  • To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Keir Fraser" <keir@xxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Thu, 12 Jul 2007 13:05:31 +0800
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 11 Jul 2007 22:03:47 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Ace4wFEyWBrDMwUBRbudwW+SC7WIGwLHO6q6ABLR0tAABjWo8A==
  • Thread-topic: [Xen-devel] [PATCH 6/10] Allow vcpu to pause self

>From: Tian, Kevin
>Sent: 2007年7月12日 10:37
>>
>>I think this should not be needed. Why is dom0/vcpu0 special at all? If
>>you
>>are doing the final work from a softirq context, can't dom0/vcpu0 simply
>>be
>>paused like all others at that point? If not then we'll need to make some
>>arrangement using vcpu_set_affinity() - I won't add another flag on the
>>context-switch path.
>
>I tried to recall the reason for adding this flag. The major reason is that
>sleep hypercall happens on dom0/vcpu0's context, while actual
>enter_state may happen in softirq on idle vcpu context. As a result, we
>need to update rax as return value to dom0/vcpu0 which means lazy
>state required flush into per-vcpu guest context before updating.
>However existing vcpu_pause doesn't work on self context and
>vcpu_pause_nosync leaves lazy state there. That's why a new flag is
>added to allow lazy context sync-ed after switching out.
>
>But after a further thinking, based on the fact that enter_state will force
>a lazy context flush on all CPUs now, this interface can be abandoned
>then.
>

Seems issue still existing. It's possible that force lazy context flush 
in enter_state is done before dom0/vcpu0 enters context switch, 
since softirq is sent out before pause. How to find a safe point where 
we know that dom0/vcpu0 is definitely switched out?

Vcpu_set_affinity doesn't solve the problem, since migrated vcpu 
won't continue with previous flow. Or do you mean forcing user to set 
such affinity explicitly before requesting suspend?

Thanks,
Kevin

_______________________________________________
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®.