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] Ehancement to domU suspend/resume

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Ehancement to domU suspend/resume
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 18 Jan 2007 15:27:19 +0800
Delivery-date: Wed, 17 Jan 2007 23:27:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1D4CC7B.7610%keir@xxxxxxxxxxxxx>
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: Acc6Fzl3cjV2EoL6SmOleX5Dkf0hogAkoc1wAAlI49sAABf0kA==
Thread-topic: [Xen-devel] Ehancement to domU suspend/resume
>From: Keir Fraser [mailto:keir@xxxxxxxxxxxxx]
>Sent: 2007年1月18日 15:04
>
>On 18/1/07 2:41 am, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
>
>>> freeze_processes();
>>> device_suspend();
>>> device_power_down();
>
>>> device_power_up();
>>> device_resume();
>>> thaw_processes();
>
>Any idea what cost this adds for a non driver domain? In particular, what
>does freeze/thaw do?
>
> -- Keir

Freeze basically puts all other processes into a frozen point with no 
lock held. For kernel thread, each one is required to check freezing 
flag (by try_to_freeze) at each loop out of critical chunk, and then yield 
or sleep if set. For user space process, a dummy signal notification is 
sent to that process which will then check freezing flag when do_signal 
before returning to user space. This can assure all processes falling 
into a save point before drivers are ready to suspend. Thaw just does 
the reverse to unfreeze them when resume.

Yes, it may have to wait some time for all processes to be frozen, and I 
have no estimation. But it's a necessary step to put whole box into a 
stable state. Is there any flag to check whether current domU is a driver 
domain? Then we can differentiate two paths.

Thanks,
Kevin

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