Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C9C3C433EF for ; Tue, 19 Oct 2021 11:22:09 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE13D60E8B for ; Tue, 19 Oct 2021 11:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EE13D60E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.213028.371117 (Exim 4.92) (envelope-from ) id 1mcnBh-0000dU-86; Tue, 19 Oct 2021 11:21:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 213028.371117; Tue, 19 Oct 2021 11:21:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mcnBh-0000dN-4q; Tue, 19 Oct 2021 11:21:45 +0000 Received: by outflank-mailman (input) for mailman id 213028; Tue, 19 Oct 2021 11:21:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mcnBg-0000dH-HC for xen-devel@lists.xenproject.org; Tue, 19 Oct 2021 11:21:44 +0000 Received: from smtp-out1.suse.de (unknown [195.135.220.28]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ec1c0218-679b-49d5-b6c0-69dc2d4f7723; Tue, 19 Oct 2021 11:21:43 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9251621A5D; Tue, 19 Oct 2021 11:21:42 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6F0AD13B64; Tue, 19 Oct 2021 11:21:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id obzHGUaqbmHvbAAAMHmgww (envelope-from ); Tue, 19 Oct 2021 11:21:42 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec1c0218-679b-49d5-b6c0-69dc2d4f7723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634642502; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Bsjm34oU7y3pSkCQQqWxgmwlC+hZeXr6taiQjgu1WUA=; b=J8GtlNiEgia7Z5PVFRhYonYLv4mz4AuqppfaXY5AX71VWg5A77IlAQGqvTzQaRF9S7EOFZ AR+zGxCSp/rKKPTktAUujF4HZoRtpaB7cAVMR+1LzludHraZp7XWQdByiukHu6jkRRVy5/ 5ki32Y+OGNIBdeq1IfnXFk6n7LGFsNM= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH v2] tools: fix oom setting of xenstored Date: Tue, 19 Oct 2021 13:21:40 +0200 Message-Id: <20211019112140.26988-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit f282182af32939 ("tools/xenstore: set oom score for xenstore daemon on Linux") introduced a regression when not setting the oom value in the xencommons file. Fix that. Fixes: f282182af32939 ("tools/xenstore: set oom score for xenstore daemon on Linux") Signed-off-by: Juergen Gross --- V2: use ${var:-} (Jan Beulich) --- tools/hotplug/Linux/launch-xenstore.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/hotplug/Linux/launch-xenstore.in b/tools/hotplug/Linux/launch-xenstore.in index 8438af9977..e854ca1eb8 100644 --- a/tools/hotplug/Linux/launch-xenstore.in +++ b/tools/hotplug/Linux/launch-xenstore.in @@ -60,8 +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 - XS_OOM_SCORE=-$(($XENSTORED_OOM_MEM_THRESHOLD * 10)) + XS_OOM_SCORE=-$((${XENSTORED_OOM_MEM_THRESHOLD:-50} * 10)) [ "$XENSTORED_MAX_OPEN_FDS" = "unlimited" ] || { [ -z "${XENSTORED_MAX_OPEN_FDS//[0-9]}" ] && -- 2.26.2