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 -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Dec 2005 10:06:19 +0000
Delivery-date: Fri, 09 Dec 2005 10:09:37 +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 aa74cb7b3d1777e4bc95b1c81d01c6d41f765657
# Parent  0d26cc24014b1a77256e000f8e915ef65ab5db02
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>

xen-unstable cset: ab300e9fe02b6a48cfd7fda9c50d878e11160297
committer: Robert Read <robert@xxxxxxxxxxxxx>

diff -r 0d26cc24014b -r aa74cb7b3d17 tools/examples/init.d/sysconfig.xendomains
--- a/tools/examples/init.d/sysconfig.xendomains        Wed Dec  7 03:43:43 2005
+++ b/tools/examples/init.d/sysconfig.xendomains        Wed Dec  7 07: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 0d26cc24014b -r aa74cb7b3d17 tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains  Wed Dec  7 03:43:43 2005
+++ b/tools/examples/init.d/xendomains  Wed Dec  7 07: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>