[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tools: fix oom setting of xenstored


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 19 Oct 2021 08:54:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CKrFvbS7tBHkYCpKzYSqrGy/08dg8BMVxRhNRepJzt8=; b=lE297hY5mhrk8XVrfSNfvkq3psBOCAN1uqLhzru0kroDUzuTz3pzuEHad1uBEXz0H2satsbnlIi4rCtXiosWGYysXCJLisR96OMWFPKf+3AdE6wOyxTwCqwq0Dms4JgMSP1sXxz0Sce8QzmXBenshTtz2H/Xe9EK/T9pxCkLDXa8887MWKEKRJoYt2NUrgSvrgJtKmYNCxYcrCVDsSHKpkIYmidDJv4rnGJoJ4SLYlnfX8qWxxotzJFNGYs7wWVToyMW0z+jAC31v8yMrz2z0tJrjDFcGKXaYkmG1JSAkrQHCxVw2krnF2Sdpid5M5mDmUG002Nlh/+bQ2EEXSo59g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H01QLQnivtzMGVFLHNpUIc0UGQi4vvhDtqU/9mxpsjMIPkIEcI5cYBZYKov2ju66++1FATBCEXZxi1/9j0IQ2/ZRc9WbUx3lEZsmlveiT/eyizl9ojwEPu0iMeTxUw8cNXpUioEx6AHgzhUQLxdyt2pLhyTwevjyW0TXS7TBW6CBG/mm5TRMWaIpl+5qX6mwBD7UA+71SGdlYhF/Tx8f6sBOkite6HmlMZo50vtYRT7E9YVM+QPTEU3HvtdJtVt49qHKMSXL9JXfBgWpTNm+21JNiGMpOVyYd5GI4XLfAU22QGb0BnlmbvvvZhuNepgmOEYTNNt7kXwiCiODSLU1rQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 19 Oct 2021 06:55:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2021 06:41, Juergen Gross wrote:
> --- a/tools/hotplug/Linux/launch-xenstore.in
> +++ b/tools/hotplug/Linux/launch-xenstore.in
> @@ -60,7 +60,7 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . 
> @CONFIG_DIR@/@CONFIG_LEAF
>               echo "No xenstored found"
>               exit 1
>       }
> -     [ -z "$XENSTORED_OOM_MEM_THRESHOLD" ] || XENSTORED_OOM_MEM_THRESHOLD=50
> +     [ -z "$XENSTORED_OOM_MEM_THRESHOLD" ] && XENSTORED_OOM_MEM_THRESHOLD=50

Is resilience against "set -e" being in effect of interest? If so I
think this would want to be

        [ -n "$XENSTORED_OOM_MEM_THRESHOLD" ] || XENSTORED_OOM_MEM_THRESHOLD=50

>       XS_OOM_SCORE=-$(($XENSTORED_OOM_MEM_THRESHOLD * 10))

Alternatively, how about dropping the line above and using

        XS_OOM_SCORE=-$((${XENSTORED_OOM_MEM_THRESHOLD:-50} * 10))

here?

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.