Skip to contentSkip to conversation

tools: fix oom setting of xenstored

PATCH In review Juergen Gross 2 participants 2 messages Oct 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools: fix oom setting of xenstored

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")

---
V2: use ${var:-} (Jan Beulich)

---
 tools/hotplug/Linux/launch-xenstore.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/hotplug/Linux/launch-xenstore.in +1 -2
index 8438af9977..e854ca1eb8 100644
@@ -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]}" ] &&
Signature · 1 line
2.26.2
Reviewed-by on v2 1/1
#1 lore raw

Juergen Gross writes ("[PATCH v2] tools: fix oom setting of xenstored"):

Quoted 6 lines

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")

and pushed, thanks.

Ian.