tools: add config parameter for maximum memory of xenstore domain
authorJuergen Gross <jgross@suse.com>
Mon, 8 Aug 2016 08:28:29 +0000 (10:28 +0200)
committerWei Liu <wei.liu2@citrix.com>
Tue, 6 Sep 2016 10:19:50 +0000 (11:19 +0100)
Add a parameter to xencommons configuration file for specifying the
maximum memory size of the xenstore domain.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
tools/hotplug/Linux/launch-xenstore.in

index cc8185c172ad3e021168e1093f0ff2c0fe77cc6d..92569cd61b3d6e8ad1642b91db7877971c25554a 100644 (file)
@@ -69,6 +69,17 @@ XENSTORED_ARGS=
 # Only evaluated if XENSTORETYPE is "domain".
 #XENSTORE_DOMAIN_SIZE=8
 
+## Type: string
+## Default: not set, no autoballooning of xenstore domain
+#
+# Maximum xenstore domain memory size. Can be specified as:
+# - plain integer value for max size in MiB
+# - fraction of host memory, e.g. 1/100
+# - combination of both in form of <val>:<frac> (e.g. 8:1/100), resulting
+#   value will be the higher of both specifications
+# Only evaluated if XENSTORETYPE is "domain".
+#XENSTORE_MAX_DOMAIN_SIZE=
+
 ## Type: string
 ## Default: ""
 #
index 46defd6f4321592fd9e5d009c99ffd43fabcd623..01193be34990f92780492a99f5131821b0a5985a 100644 (file)
@@ -75,6 +75,7 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . @CONFIG_DIR@/@CONFIG_LEAF
        XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --kernel $XENSTORE_DOMAIN_KERNEL"
        [ -z "$XENSTORE_DOMAIN_SIZE" ] && XENSTORE_DOMAIN_SIZE=8
        XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --memory $XENSTORE_DOMAIN_SIZE"
+       [ -z "$XENSTORE_MAX_DOMAIN_SIZE" ] || XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --maxmem $XENSTORE_MAX_DOMAIN_SIZE"
 
        echo -n Starting $XENSTORE_DOMAIN_KERNEL...
        ${LIBEXEC_BIN}/init-xenstore-domain $XENSTORE_DOMAIN_ARGS || exit 1