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-users

Re: [Xen-users] How to detect a domain shutdown with as less overheadas

To: Kip Macy <kip.macy@xxxxxxxxx>
Subject: Re: [Xen-users] How to detect a domain shutdown with as less overheadas possible?
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Sat, 30 Apr 2005 21:09:33 -0500
Cc: Lionel Bouton <lionel-subscription@xxxxxxxxxxx>, ian.pratt@xxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 01 May 2005 02:09:18 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b1fa291705043008377afb5406@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3E16@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <b1fa291705043008377afb5406@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
Kip Macy wrote:

In tools/python/xen/xend/XendDomain.py you'll see that reap is called
by onVirq which in turn is a handler registered for xend.virq.
xend.virq is an event-channel used by xend for notifications. It is
set up in tools/python/xen/xend/server/channel.py. In -testing reap
appears to be called as soon as a domain crashes, meaning that
everything is working as it should. In -unstable a guest doesn't get
reaped until 'xm list' gets called awakening xend to the fact that it
has work to do.
There's a bug under bugzilla (#7) about this. It appears xcs is not delivering VIRQs properly.

The DOM_EXC virq won't be delivered for every possible shutdown case either. It's delivered for a crash or for a shutdown (a domain initiated shutdown) but not for a domain destroy.

I've found the best way to detect shutdown reliably is with a polling loop. There's code in xenctld to do just this (and I believe Mike Wray is doing this too in the new Xend).

I've done performance testing with querying every 2 seconds and the overhead is trivial.

As Mark mentioned, there is an event socket for Xend. Be warned though that right now, those event are probably not very reliable.

If you're looking for a cheap solution that can be done with the shell, I'd suggesting grabbing VM-Tools and using the vm-list command to query the flags of a domain. It will have significantly less overhead than xm list.

Regards,
Anthony Liguori

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-users] How to detect a domain shutdown with as less overheadas possible?, Anthony Liguori <=