From patchwork Mon Aug 8 08:28:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 9266913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2006D60754 for ; Mon, 8 Aug 2016 08:31:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11BF626A99 for ; Mon, 8 Aug 2016 08:31:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06890277D9; Mon, 8 Aug 2016 08:31:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E70626A99 for ; Mon, 8 Aug 2016 08:31:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWfvJ-0000Ha-8j; Mon, 08 Aug 2016 08:28:37 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWfvH-0000H4-My for xen-devel@lists.xen.org; Mon, 08 Aug 2016 08:28:35 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id F4/94-17152-2B248A75; Mon, 08 Aug 2016 08:28:34 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRWlGSWpSXmKPExsVyuP0Ov+4mpxX hBleOSlos+biYxYHR4+ju30wBjFGsmXlJ+RUJrBkLTjexFizir5jz/T9rA+Mu3i5GTg4JASOJ txP/MXUxcnEICSxklJiwYh0LSIJNQFViw/VTrCC2iIC0xLXPlxlBbGaBCok1i+aA1QgLhEk0X fjO1sXIwcECVD/jfQWIyStgLzH3swDEeDmJ6zOnM4HYnAIOEkcfLGMGKRECKmlZrjiBkXsBI8 MqRo3i1KKy1CJdYwO9pKLM9IyS3MTMHF1DA2O93NTi4sT01JzEpGK95PzcTYxAz9YzMDDuYOw 84XeIUZKDSUmUV0ppRbgQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCV4/R6CcYFFqempFWmYOMMRg 0hIcPEoivG4gad7igsTc4sx0iNQpRkUpcd4skIQASCKjNA+uDRbWlxhlpYR5GRkYGIR4ClKLc jNLUOVfMYpzMCoJ8050AJrCk5lXAjf9FdBiJqDFSapgi0sSEVJSDYxy9p7Jbp5KVy6vsov8Vf urMeXG7tL9qoeXON05d717ou7vuXsC74mwLPJT3fHk4pWtIote7VP8vkCxcTXb3b9HPyRPaNY LEFourBI3ueewU/dDF48idY3rq0/PyVHj2yMudnktc6nF2sccU68U2/P46Mz3E5rRxTW7Zsli /mSVq2utXs8P/PFbiaU4I9FQi7moOBEA+eiqfWYCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1470644914!53880131!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26944 invoked from network); 8 Aug 2016 08:28:34 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-13.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 8 Aug 2016 08:28:34 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 396F5AAEF; Mon, 8 Aug 2016 08:28:32 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org Date: Mon, 8 Aug 2016 10:28:29 +0200 Message-Id: <1470644909-22859-4-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1470644909-22859-1-git-send-email-jgross@suse.com> References: <1470644909-22859-1-git-send-email-jgross@suse.com> Cc: Juergen Gross , wei.liu2@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add a parameter to xencommons configuration file for specifying the maximum memory size of the xenstore domain. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 11 +++++++++++ tools/hotplug/Linux/launch-xenstore.in | 1 + 2 files changed, 12 insertions(+) diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in index cc8185c..92569cd 100644 --- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in +++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in @@ -70,6 +70,17 @@ XENSTORED_ARGS= #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 : (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: "" # # Additional arguments for starting the xenstore domain. diff --git a/tools/hotplug/Linux/launch-xenstore.in b/tools/hotplug/Linux/launch-xenstore.in index 46defd6..01193be 100644 --- a/tools/hotplug/Linux/launch-xenstore.in +++ b/tools/hotplug/Linux/launch-xenstore.in @@ -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