summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorOleksandr Natalenko <oleksandr@natalenko.name>2016-05-17 16:45:44 +0300
committerVijay Bellur <vbellur@redhat.com>2016-06-01 11:14:43 -0700
commit0673af0f0c7ba64cce6b030b9194b4d35a357cd4 (patch)
tree9638ddf0ce70f9432c02c8c97b365858c3c2fb22 /xlators
parent6328ea45733852f299e4457bba97f632d8bada60 (diff)
glusterfsd/main: Add ability to set oom_score_adj
Give the administrator a possibility to set oom_score_adj for glusterfs process. Applies to Linux only. This is a backport of cb8f5e01f639cb6e8715b33bb725210cb0493887. Change-Id: Iff13c2f4cb28457871c6ebeff6130bce4a8bf543 BUG: 1341697 Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/14399 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14605 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 78e32826b0b..acdbca3467f 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -230,6 +230,10 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --congestion-threshold=$cong_threshold");
fi
+ if [ -n "$oom_score_adj" ]; then
+ cmd_line=$(echo "$cmd_line --oom-score-adj=$oom_score_adj");
+ fi
+
if [ -n "$fuse_mountopts" ]; then
cmd_line=$(echo "$cmd_line --fuse-mountopts=$fuse_mountopts");
fi
@@ -444,6 +448,9 @@ with_options()
"congestion-threshold")
cong_threshold=$value
;;
+ "oom-score-adj")
+ oom_score_adj=$value
+ ;;
"xlator-option")
xlator_option=$value
;;