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] [PATCH][RESEND] Fix xm reboot --wait

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH][RESEND] Fix xm reboot --wait
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Fri, 01 Sep 2006 20:51:34 +0900
Delivery-date: Fri, 01 Sep 2006 04:52:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C11CDC1B.1D37%Keir.Fraser@xxxxxxxxxxxx>
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>
References: <C11CDC1B.1D37%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>On 31/8/06 3:56 am, "Masaki Kanno" <kanno.masaki@xxxxxxxxxxxxxx> wrote:
>
>> Hi Keir,
>> 
>> Could you teach about the 'synchronous flag' in detail?
>> Is the 'synchronous flag' a interface that requests the response
>> from xend to xm to be delayed until the reboot of domU is completed?
>> 
>> Best regards,
>>  Kan
>
>That's the idea, yes. It seems neater to have xend provide this feature
>directly rather than place detail sof its implementation in xm itself by
>making the 'restart counter' available across RPC.

Hi Keir,

Currently, xm reboot command processing is the almost following 
sequences.

Currently:
------------------------------+------------------------+---------------
xm                            |xend                    |domU(VM1)
------------------------------+------------------------+---------------
xm create VM1                 |                        |
                              |  VM1.restart_count==0  |
xm reboot VM1                 |                        |
  VM1.getRestartCount() <----------->                  |
   : Counter is 0             |                        |
  VM1.shutdown('reboot') <---------->                  |
                              |  VM1.shutdown <-----------> +
                              |                        |    |
                              |                        |  shutdown
                              |                        |  processing
                              |                        |    |
  VM1.getRestartCount() <----------->                  |    |
   : Counter is 0, no count up|             <-------------- +
                              |  VM1.destroy           |
                              |  VM1.create            |
                              |  VM1.restart_count++   |
                              |                        |
  VM1.getRestartCount() <----------->                  |
   : Counter is 1, count up!  |                        |
                              |                        |
  info("Domain VM1 rebooted") |                        |
                              |                        |
------------------------------+------------------------+---------------


If xm/xend implemented 'synchronous flag' which was your idea, I think 
that xm reboot command is the almost following sequences. Am I right?

Synchronous flag:
------------------------------+------------------------+---------------
xm                            |xend                    |domU(VM1)
------------------------------+------------------------+---------------
xm create VM1                 |                        |
                              |                        |
xm reboot VM1                 |                        |
  VM1.shutdown('reboot',sync)------->                  |
                          |   |  VM1.shutdown <-----------> +
                          |   |                        |    |
                          |   |                        |  shutdown
                          |   |                        |  processing
                          |   |                        |    |
                        wait  |                        |    |
                          |   |             <-------------- +
                          |   |  VM1.destroy           |
                          V   |  VM1.create            |
                        <------- Completion response   |
                              |                        |
  info("Domain VM1 rebooted") |                        |
                              |                        |
------------------------------+------------------------+---------------


If a user rebooted one VM, both implementations are the same for execute 
time of xm reboot command. However, xm reboot command has 'all' option. 
If a user rebooted all VMs with 'all' option, I think that the execute 
time of xm reboot command lengthen in proportion to the number of VM.

Synchronous flag(--all):
------------------------------+------------------------+---------------
xm                            |xend                    |domU
------------------------------+------------------------+---------------
xm create VM1                 |                        |
xm create VM2                 |                        |
                              |                        |
xm reboot --all               |                        |
  VM1.shutdown('reboot',sync)------->                  |
                          |   |  VM1.shutdown <-----------> +
                          |   |                        |    |
                          |   |                        |  shutdown
                          |   |                        |  processing
                          |   |                        |    |
                        wait  |                        |    |
                          |   |             <-------------- +
                          |   |  VM1.destroy           |
                          V   |  VM1.create            |
                        <------- Completion response   |
                              |                        |
  info("Domain VM1 rebooted") |                        |
  VM2.shutdown('reboot',sync)------->                  |
                          |   |  VM2.shutdown <-----------> +
                          |   |                        |    |
                          |   |                        |  shutdown
                          |   |                        |  processing
                          |   |                        |    |
                        wait  |                        |    |
                          |   |             <-------------- +
                          |   |  VM2.destroy           |
                          V   |  VM2.create            |
                        <------- Completion response   |
                              |                        |
  info("Domain VM2 rebooted") |                        |
                              |                        |
------------------------------+------------------------+---------------


As for the current implementation, if a user rebooted all VMs with 
'all' option, shutdown processing of each VM is executed in parallel.


Best regards,
 Kan

>
> -- Keir
>



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH][RESEND] Fix xm reboot --wait, Masaki Kanno <=