Skip to content
Snippets Groups Projects
Commit 2d0df2ed authored by Danny Auble's avatar Danny Auble Committed by Alejandro Sanchez
Browse files

Fix problem setting SLURMSTEPD_OOM_ADJ introduced in 8325e9f8.

Bug 4478 comment 25.
parent dd80bc57
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,6 @@ extern int init_system_memory_cgroup(void) ...@@ -188,7 +188,6 @@ extern int init_system_memory_cgroup(void)
{ {
int fstatus = SLURM_ERROR; int fstatus = SLURM_ERROR;
char* slurm_cgpath; char* slurm_cgpath;
const char *oom_score_min = (const char *)OOM_SCORE_ADJ_MIN;
/* read cgroup configuration */ /* read cgroup configuration */
if (read_slurm_cgroup_conf(&slurm_cgroup_conf)) if (read_slurm_cgroup_conf(&slurm_cgroup_conf))
...@@ -260,10 +259,10 @@ extern int init_system_memory_cgroup(void) ...@@ -260,10 +259,10 @@ extern int init_system_memory_cgroup(void)
* OOM killer behavior, keep it, otherwise set the * OOM killer behavior, keep it, otherwise set the
* OOM_SCORE_ADJ_MIN value, wich means do not let OOM killer kill it * OOM_SCORE_ADJ_MIN value, wich means do not let OOM killer kill it
* *
* FYI, setting "export SLURMSTEPD_OOM_ADJ=-1000" * FYI, setting "export SLURMSTEPD_OOM_ADJ=OOM_SCORE_ADJ_MIN (-1000)"
* in /etc/sysconfig/slurm would be the same * in /etc/sysconfig/slurm would be the same
*/ */
setenv("SLURMSTEPD_OOM_ADJ", oom_score_min, 0); setenvfs("SLURMSTEPD_OOM_ADJ=%d", OOM_SCORE_ADJ_MIN);
/* create slurm root cg in this cg namespace */ /* create slurm root cg in this cg namespace */
slurm_cgpath = _system_cgroup_create_slurm_cg(&memory_ns); slurm_cgpath = _system_cgroup_create_slurm_cg(&memory_ns);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment