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

[Xen-changelog] Fix usleep definition -- we would be sleeping 1000 times

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix usleep definition -- we would be sleeping 1000 times too long if the usleep
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Dec 2005 17:12:06 +0000
Delivery-date: Wed, 07 Dec 2005 17:45:28 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID ab300e9fe02b6a48cfd7fda9c50d878e11160297
# Parent  5f574f9cb4bd2b5eebd98ce6fc43ce0c33d7b1d4
Fix usleep definition -- we would be sleeping 1000 times too long if the usleep
command were not available elsewhere on the machine (on my Debian boxes, for
example).

Sleep for a configurable amount of time between xm create calls (by default,
5 seconds).  This spaces out the booting of the new domains, meaning that they
should not thrash the disk so much.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 5f574f9cb4bd -r ab300e9fe02b tools/examples/init.d/sysconfig.xendomains
--- a/tools/examples/init.d/sysconfig.xendomains        Wed Dec  7 11:57:26 2005
+++ b/tools/examples/init.d/sysconfig.xendomains        Wed Dec  7 15:41:41 2005
@@ -19,6 +19,17 @@
 # it to a relatively high value (1200000).
 #
 XENDOMAINS_USLEEP=100000
+
+## Type: integer
+## Default: 5000000
+#
+# When creating a guest domain, it is sensible to allow a little time for it
+# to get started before creating another domain or proceeding through the
+# boot process.  Without this, the booting guests will thrash the disk as they
+# start up.  This timeout (in microseconds) specifies the delay after guest
+# domain creation.
+#
+XENDOMAINS_CREATE_USLEEP=5000000
 
 ## Type: string
 ## Default: ""
diff -r 5f574f9cb4bd -r ab300e9fe02b tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains  Wed Dec  7 11:57:26 2005
+++ b/tools/examples/init.d/xendomains  Wed Dec  7 15:41:41 2005
@@ -127,7 +127,7 @@
   {
     if [ -n "$1" ]
     then
-      sleep $(( $1 / 1000 ))
+      sleep $(( $1 / 1000000 ))
     fi
   }
 fi
@@ -241,6 +241,8 @@
                if [ $? -ne 0 ]; then
                    rc_failed $?
                    echo -n '!'
+               else
+                   usleep $XENDOMAINS_CREATE_USLEEP
                fi
            fi
        done

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

<Prev in Thread] Current Thread [Next in Thread>