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

Re: [Xen-devel] suspend operation in XEND



> when the domainU is being suspended I see "shutdown_suspend_t" message
> sent to the domain thru the event channel by XEND.
>
> what does the domainU do on receiving this message ??

There's various other stuff a domain does do when suspending.  See 
linux-2.6.10-xen-sparse/arch/xen/kernel/reboot.c.  In particular, the 
function __do_suspend() calls various subsystems, creates a "suspend record" 
and then hypercalls into Xen with HYPERVISOR_suspend(), telling it where the 
suspend record actually is.

When the domain sees the hypercall return, it has been resumed, so this 
function runs through and resumes various kernel subsystems.

> is the DISCONNECTED message sent by XEND as a part of suspend_domain
> or as a part of destroy_domain??

OK, looking at the code, this doesn't work quite how I thought it did - sorry.

* A DISCONNECTED message on a CONNECTED interface means "your backend has 
disappeared because of failure  - please reconnect to the new backend".  So 
Xend sends it on resume to notify the domain that it needs to reconnect when 
a driver domain is restarted.  This only occurs on driver domain reboots.
* A DISCONNECTED message on a CLOSED interface means "this interface (which 
was in the process is tear down) has now gone".  This would only occur when 
an interface is torn down and I'm not sure that actually happens in practice 
(?)

I originally thought suspend / resume was now treated exactly like a backend 
failure but apparently that's not quite right:

__do_suspend() (as mentioned above) notifies the drivers when a suspend will 
occur.  They can use this to tear down some stuff (the block driver doesn't 
appear to need to do anything, it seems).  When the domain is restored, the 
second half of __do_suspend() notifies the drivers that a resume has occurred 
and they send messages to the domain controller requesting a reconnect.

After that, they just requeue pending requests, as they would also do in the 
case of a backend restart.

Any DISCONNECTED messages that occur will be during the resume as part of the 
reconnection protocol but it's too late at night to figure out exactly what's 
involved.  They won't happen during the suspend AFAIK.

HTH,
Mark


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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