Skip to content
Snippets Groups Projects
Commit d60434f2 authored by David Bigagli's avatar David Bigagli
Browse files

Comment the cgroup blkio code until the full kernel support is ready.

parent e27b13f0
No related branches found
No related tags found
No related merge requests found
...@@ -105,12 +105,9 @@ static slurm_cgroup_conf_t slurm_cgroup_conf; ...@@ -105,12 +105,9 @@ static slurm_cgroup_conf_t slurm_cgroup_conf;
static void _prec_extra(jag_prec_t *prec, int pagesize) static void _prec_extra(jag_prec_t *prec, int pagesize)
{ {
int utime, stime, total_rss, total_pgpgin; int utime, stime, total_rss, total_pgpgin;
int dev_major;
uint64_t read_bytes, write_bytes, tot_read, tot_write;
char *cpu_time, *memory_stat, *ptr; char *cpu_time, *memory_stat, *ptr;
char *blkio_bytes, *next_device;
size_t cpu_time_size, memory_stat_size; size_t cpu_time_size, memory_stat_size;
size_t blkio_bytes_size;
//DEF_TIMERS; //DEF_TIMERS;
//START_TIMER; //START_TIMER;
...@@ -139,28 +136,34 @@ static void _prec_extra(jag_prec_t *prec, int pagesize) ...@@ -139,28 +136,34 @@ static void _prec_extra(jag_prec_t *prec, int pagesize)
prec->pages = total_pgpgin; prec->pages = total_pgpgin;
} }
/* "Read" and "Write" from blkio.throttle.io_service_bytes are /* FIXME: Enable when kernel support ready.
*
* "Read" and "Write" from blkio.throttle.io_service_bytes are
* counts of bytes read and written for physical disk I/Os only. * counts of bytes read and written for physical disk I/Os only.
* These counts do not include disk I/Os satisfied from cache. * These counts do not include disk I/Os satisfied from cache.
*/ */
xcgroup_get_param(&task_blkio_cg, "blkio.throttle.io_service_bytes", /* int dev_major; */
&blkio_bytes, &blkio_bytes_size); /* uint64_t read_bytes, write_bytes, tot_read, tot_write; */
next_device = blkio_bytes; /* char *blkio_bytes, *next_device; */
tot_read = tot_write = 0; /* size_t blkio_bytes_size; */
while ((sscanf(next_device, "%d:", &dev_major)) > 0) { /* xcgroup_get_param(&task_blkio_cg, "blkio.throttle.io_service_bytes", */
if ((dev_major > 239) && (dev_major < 255)) /* &blkio_bytes, &blkio_bytes_size); */
/* skip experimental device codes */ /* next_device = blkio_bytes; */
continue; /* tot_read = tot_write = 0; */
next_device = strstr(next_device, "Read"); /* while ((sscanf(next_device, "%d:", &dev_major)) > 0) { */
sscanf(next_device, "%*s %"PRIu64"", &read_bytes); /* if ((dev_major > 239) && (dev_major < 255)) */
next_device = strstr(next_device, "Write"); /* /\* skip experimental device codes *\/ */
sscanf(next_device, "%*s %"PRIu64"", &write_bytes); /* continue; */
tot_read+=read_bytes; /* next_device = strstr(next_device, "Read"); */
tot_write+=write_bytes; /* sscanf(next_device, "%*s %"PRIu64"", &read_bytes); */
next_device = strstr(next_device, "Total"); /* next_device = strstr(next_device, "Write"); */
} /* sscanf(next_device, "%*s %"PRIu64"", &write_bytes); */
prec->disk_read = (double)tot_read / (double)1048576; /* tot_read+=read_bytes; */
prec->disk_write = (double)tot_write / (double)1048576; /* tot_write+=write_bytes; */
/* next_device = strstr(next_device, "Total"); */
/* } */
/* prec->disk_read = (double)tot_read / (double)1048576; */
/* prec->disk_write = (double)tot_write / (double)1048576; */
/* info("after %d %d", total_rss, pagesize); */ /* info("after %d %d", total_rss, pagesize); */
/* print_jag_prec(prec); */ /* print_jag_prec(prec); */
...@@ -221,14 +224,16 @@ extern int init (void) ...@@ -221,14 +224,16 @@ extern int init (void)
return SLURM_ERROR; return SLURM_ERROR;
} }
/* Enable blkio subsystem. /* FIXME: Enable when kernel support ready.
*
* Enable blkio subsystem.
*/ */
if (jobacct_gather_cgroup_blkio_init(&slurm_cgroup_conf) /* if (jobacct_gather_cgroup_blkio_init(&slurm_cgroup_conf) */
!= SLURM_SUCCESS) { /* != SLURM_SUCCESS) { */
xcpuinfo_fini(); /* xcpuinfo_fini(); */
free_slurm_cgroup_conf(&slurm_cgroup_conf); /* free_slurm_cgroup_conf(&slurm_cgroup_conf); */
return SLURM_ERROR; /* return SLURM_ERROR; */
} /* } */
} }
verbose("%s loaded", plugin_name); verbose("%s loaded", plugin_name);
...@@ -240,7 +245,7 @@ extern int fini (void) ...@@ -240,7 +245,7 @@ extern int fini (void)
if (_run_in_daemon()) { if (_run_in_daemon()) {
jobacct_gather_cgroup_cpuacct_fini(&slurm_cgroup_conf); jobacct_gather_cgroup_cpuacct_fini(&slurm_cgroup_conf);
jobacct_gather_cgroup_memory_fini(&slurm_cgroup_conf); jobacct_gather_cgroup_memory_fini(&slurm_cgroup_conf);
jobacct_gather_cgroup_blkio_fini(&slurm_cgroup_conf); /* jobacct_gather_cgroup_blkio_fini(&slurm_cgroup_conf); */
acct_gather_energy_fini(); acct_gather_energy_fini();
/* unload configuration */ /* unload configuration */
...@@ -300,9 +305,9 @@ extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id) ...@@ -300,9 +305,9 @@ extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id)
SLURM_SUCCESS) SLURM_SUCCESS)
return SLURM_ERROR; return SLURM_ERROR;
if (jobacct_gather_cgroup_blkio_attach_task(pid, jobacct_id) != /* if (jobacct_gather_cgroup_blkio_attach_task(pid, jobacct_id) != */
SLURM_SUCCESS) /* SLURM_SUCCESS) */
return SLURM_ERROR; /* return SLURM_ERROR; */
return SLURM_SUCCESS; return SLURM_SUCCESS;
} }
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
extern xcgroup_t task_memory_cg; extern xcgroup_t task_memory_cg;
extern xcgroup_t task_cpuacct_cg; extern xcgroup_t task_cpuacct_cg;
extern xcgroup_t task_blkio_cg;
extern int jobacct_gather_cgroup_cpuacct_init( extern int jobacct_gather_cgroup_cpuacct_init(
slurm_cgroup_conf_t *slurm_cgroup_conf); slurm_cgroup_conf_t *slurm_cgroup_conf);
...@@ -66,13 +65,15 @@ extern int jobacct_gather_cgroup_memory_fini( ...@@ -66,13 +65,15 @@ extern int jobacct_gather_cgroup_memory_fini(
extern int jobacct_gather_cgroup_memory_attach_task( extern int jobacct_gather_cgroup_memory_attach_task(
pid_t pid, jobacct_id_t *jobacct_id); pid_t pid, jobacct_id_t *jobacct_id);
extern int jobacct_gather_cgroup_blkio_init( /* FIXME: Enable when kernel support ready. */
slurm_cgroup_conf_t *slurm_cgroup_conf); /* extern xcgroup_t task_blkio_cg; */
/* extern int jobacct_gather_cgroup_blkio_init( */
/* slurm_cgroup_conf_t *slurm_cgroup_conf); */
extern int jobacct_gather_cgroup_blkio_fini( /* extern int jobacct_gather_cgroup_blkio_fini( */
slurm_cgroup_conf_t *slurm_cgroup_conf); /* slurm_cgroup_conf_t *slurm_cgroup_conf); */
extern int jobacct_gather_cgroup_blkio_attach_task( /* extern int jobacct_gather_cgroup_blkio_attach_task( */
pid_t pid, jobacct_id_t *jobacct_id); /* pid_t pid, jobacct_id_t *jobacct_id); */
extern char* jobacct_cgroup_create_slurm_cg (xcgroup_ns_t* ns); extern char* jobacct_cgroup_create_slurm_cg (xcgroup_ns_t* ns);
...@@ -36,276 +36,278 @@ ...@@ -36,276 +36,278 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\*****************************************************************************/ \*****************************************************************************/
#if HAVE_CONFIG_H /* FIXME: Enable when kernel support is ready. */
#include "config.h"
#endif /* #if HAVE_CONFIG_H */
/* #include "config.h" */
#include <sys/types.h> /* #endif */
#include <stdlib.h> /* getenv */
/* #include <sys/types.h> */
#include "slurm/slurm_errno.h" /* #include <stdlib.h> /\* getenv *\/ */
#include "slurm/slurm.h"
#include "src/common/xstring.h" /* #include "slurm/slurm_errno.h" */
#include "src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h" /* #include "slurm/slurm.h" */
#include "src/slurmd/slurmstepd/slurmstepd_job.h" /* #include "src/common/xstring.h" */
#include "src/slurmd/slurmd/slurmd.h" /* #include "src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h" */
/* #include "src/slurmd/slurmstepd/slurmstepd_job.h" */
#ifndef PATH_MAX /* #include "src/slurmd/slurmd/slurmd.h" */
#define PATH_MAX 256
#endif /* #ifndef PATH_MAX */
/* #define PATH_MAX 256 */
static char user_cgroup_path[PATH_MAX]; /* #endif */
static char job_cgroup_path[PATH_MAX];
static char jobstep_cgroup_path[PATH_MAX]; /* static char user_cgroup_path[PATH_MAX]; */
static char task_cgroup_path[PATH_MAX]; /* static char job_cgroup_path[PATH_MAX]; */
/* static char jobstep_cgroup_path[PATH_MAX]; */
static xcgroup_ns_t blkio_ns; /* static char task_cgroup_path[PATH_MAX]; */
static xcgroup_t user_blkio_cg; /* static xcgroup_ns_t blkio_ns; */
static xcgroup_t job_blkio_cg;
static xcgroup_t step_blkio_cg; /* static xcgroup_t user_blkio_cg; */
xcgroup_t task_blkio_cg; /* static xcgroup_t job_blkio_cg; */
/* static xcgroup_t step_blkio_cg; */
/* xcgroup_t task_blkio_cg; */
extern int jobacct_gather_cgroup_blkio_init(
slurm_cgroup_conf_t *slurm_cgroup_conf)
{ /* extern int jobacct_gather_cgroup_blkio_init( */
/* initialize user/job/jobstep cgroup relative paths */ /* slurm_cgroup_conf_t *slurm_cgroup_conf) */
user_cgroup_path[0]='\0'; /* { */
job_cgroup_path[0]='\0'; /* /\* initialize user/job/jobstep cgroup relative paths *\/ */
jobstep_cgroup_path[0]='\0'; /* user_cgroup_path[0]='\0'; */
/* job_cgroup_path[0]='\0'; */
/* initialize blkio cgroup namespace */ /* jobstep_cgroup_path[0]='\0'; */
if (xcgroup_ns_create(slurm_cgroup_conf, &blkio_ns, "", "blkio")
!= XCGROUP_SUCCESS) { /* /\* initialize blkio cgroup namespace *\/ */
error("jobacct_gather/cgroup: unable to create blkio " /* if (xcgroup_ns_create(slurm_cgroup_conf, &blkio_ns, "", "blkio") */
"namespace"); /* != XCGROUP_SUCCESS) { */
return SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create blkio " */
} /* "namespace"); */
return SLURM_SUCCESS; /* return SLURM_ERROR; */
} /* } */
/* return SLURM_SUCCESS; */
extern int jobacct_gather_cgroup_blkio_fini( /* } */
slurm_cgroup_conf_t *slurm_cgroup_conf)
{ /* extern int jobacct_gather_cgroup_blkio_fini( */
if (user_cgroup_path[0] == '\0' || /* slurm_cgroup_conf_t *slurm_cgroup_conf) */
job_cgroup_path[0] == '\0' || /* { */
jobstep_cgroup_path[0] == '\0') /* if (user_cgroup_path[0] == '\0' || */
return SLURM_SUCCESS; /* job_cgroup_path[0] == '\0' || */
/* jobstep_cgroup_path[0] == '\0') */
xcgroup_destroy(&user_blkio_cg); /* return SLURM_SUCCESS; */
xcgroup_destroy(&job_blkio_cg);
xcgroup_destroy(&step_blkio_cg); /* xcgroup_destroy(&user_blkio_cg); */
/* xcgroup_destroy(&job_blkio_cg); */
user_cgroup_path[0]='\0'; /* xcgroup_destroy(&step_blkio_cg); */
job_cgroup_path[0]='\0';
jobstep_cgroup_path[0]='\0'; /* user_cgroup_path[0]='\0'; */
/* job_cgroup_path[0]='\0'; */
xcgroup_ns_destroy(&blkio_ns); /* jobstep_cgroup_path[0]='\0'; */
return SLURM_SUCCESS; /* xcgroup_ns_destroy(&blkio_ns); */
}
/* return SLURM_SUCCESS; */
extern int jobacct_gather_cgroup_blkio_attach_task( /* } */
pid_t pid, jobacct_id_t *jobacct_id)
{ /* extern int jobacct_gather_cgroup_blkio_attach_task( */
xcgroup_t blkio_cg; /* pid_t pid, jobacct_id_t *jobacct_id) */
stepd_step_rec_t *job; /* { */
uid_t uid; /* xcgroup_t blkio_cg; */
gid_t gid; /* stepd_step_rec_t *job; */
uint32_t jobid; /* uid_t uid; */
uint32_t stepid; /* gid_t gid; */
uint32_t taskid; /* uint32_t jobid; */
int fstatus = SLURM_SUCCESS; /* uint32_t stepid; */
int rc; /* uint32_t taskid; */
char* slurm_cgpath; /* int fstatus = SLURM_SUCCESS; */
/* int rc; */
job = jobacct_id->job; /* char* slurm_cgpath; */
uid = job->uid;
gid = job->gid; /* job = jobacct_id->job; */
jobid = job->jobid; /* uid = job->uid; */
stepid = job->stepid; /* gid = job->gid; */
taskid = jobacct_id->taskid; /* jobid = job->jobid; */
/* stepid = job->stepid; */
/* create slurm root cg in this cg namespace */ /* taskid = jobacct_id->taskid; */
slurm_cgpath = jobacct_cgroup_create_slurm_cg(&blkio_ns);
if (!slurm_cgpath) { /* /\* create slurm root cg in this cg namespace *\/ */
return SLURM_ERROR; /* slurm_cgpath = jobacct_cgroup_create_slurm_cg(&blkio_ns); */
} /* if (!slurm_cgpath) { */
/* return SLURM_ERROR; */
/* build user cgroup relative path if not set (should not be) */ /* } */
if (*user_cgroup_path == '\0') {
if (snprintf(user_cgroup_path, PATH_MAX, /* /\* build user cgroup relative path if not set (should not be) *\/ */
"%s/uid_%u", slurm_cgpath, uid) >= PATH_MAX) { /* if (*user_cgroup_path == '\0') { */
error("unable to build uid %u cgroup relative " /* if (snprintf(user_cgroup_path, PATH_MAX, */
"path : %m", uid); /* "%s/uid_%u", slurm_cgpath, uid) >= PATH_MAX) { */
xfree(slurm_cgpath); /* error("unable to build uid %u cgroup relative " */
return SLURM_ERROR; /* "path : %m", uid); */
} /* xfree(slurm_cgpath); */
} /* return SLURM_ERROR; */
/* } */
/* build job cgroup relative path if not set (may not be) */ /* } */
if (*job_cgroup_path == '\0') {
if (snprintf(job_cgroup_path, PATH_MAX, "%s/job_%u", /* /\* build job cgroup relative path if not set (may not be) *\/ */
user_cgroup_path, jobid) >= PATH_MAX) { /* if (*job_cgroup_path == '\0') { */
error("jobacct_gather/cgroup: unable to build job %u " /* if (snprintf(job_cgroup_path, PATH_MAX, "%s/job_%u", */
"blkio cg relative path : %m", jobid); /* user_cgroup_path, jobid) >= PATH_MAX) { */
return SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to build job %u " */
} /* "blkio cg relative path : %m", jobid); */
} /* return SLURM_ERROR; */
/* } */
/* build job step cgroup relative path if not set (may not be) */ /* } */
if (*jobstep_cgroup_path == '\0') {
if (snprintf(jobstep_cgroup_path, PATH_MAX, "%s/step_%u", /* /\* build job step cgroup relative path if not set (may not be) *\/ */
job_cgroup_path, stepid) >= PATH_MAX) { /* if (*jobstep_cgroup_path == '\0') { */
error("jobacct_gather/cgroup: unable to build job step " /* if (snprintf(jobstep_cgroup_path, PATH_MAX, "%s/step_%u", */
"%u blkio cg relative path : %m", stepid); /* job_cgroup_path, stepid) >= PATH_MAX) { */
return SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to build job step " */
} /* "%u blkio cg relative path : %m", stepid); */
} /* return SLURM_ERROR; */
/* } */
/* build task cgroup relative path */ /* } */
if (snprintf(task_cgroup_path, PATH_MAX, "%s/task_%u",
jobstep_cgroup_path, taskid) >= PATH_MAX) { /* /\* build task cgroup relative path *\/ */
error("jobacct_gather/cgroup: unable to build task %u " /* if (snprintf(task_cgroup_path, PATH_MAX, "%s/task_%u", */
"blkio cg relative path : %m", taskid); /* jobstep_cgroup_path, taskid) >= PATH_MAX) { */
return SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to build task %u " */
} /* "blkio cg relative path : %m", taskid); */
/* return SLURM_ERROR; */
fstatus = SLURM_SUCCESS; /* } */
/* /* fstatus = SLURM_SUCCESS; */
* create blkio root cg and lock it
* /* /\* */
* we will keep the lock until the end to avoid the effect of a release /* * create blkio root cg and lock it */
* agent that would remove an existing cgroup hierarchy while we are /* * */
* setting it up. As soon as the step cgroup is created, we can release /* * we will keep the lock until the end to avoid the effect of a release */
* the lock. /* * agent that would remove an existing cgroup hierarchy while we are */
* Indeed, consecutive slurm steps could result in cg being removed /* * setting it up. As soon as the step cgroup is created, we can release */
* between the next EEXIST instanciation and the first addition of /* * the lock. */
* a task. The release_agent will have to lock the root blkio cgroup /* * Indeed, consecutive slurm steps could result in cg being removed */
* to avoid this scenario. /* * between the next EEXIST instanciation and the first addition of */
*/ /* * a task. The release_agent will have to lock the root blkio cgroup */
/* * to avoid this scenario. */
if (xcgroup_create(&blkio_ns, &blkio_cg, "", 0, 0) /* *\/ */
!= XCGROUP_SUCCESS) {
error("jobacct_gather/cgroup: unable to create root blkio " /* if (xcgroup_create(&blkio_ns, &blkio_cg, "", 0, 0) */
"xcgroup"); /* != XCGROUP_SUCCESS) { */
return SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create root blkio " */
} /* "xcgroup"); */
if (xcgroup_lock(&blkio_cg) != XCGROUP_SUCCESS) { /* return SLURM_ERROR; */
xcgroup_destroy(&blkio_cg); /* } */
error("jobacct_gather/cgroup: unable to lock root blkio cg"); /* if (xcgroup_lock(&blkio_cg) != XCGROUP_SUCCESS) { */
return SLURM_ERROR; /* xcgroup_destroy(&blkio_cg); */
} /* error("jobacct_gather/cgroup: unable to lock root blkio cg"); */
/* return SLURM_ERROR; */
/* /* } */
* Create user cgroup in the blkio ns (it could already exist)
*/ /* /\* */
if (xcgroup_create(&blkio_ns, &user_blkio_cg, /* * Create user cgroup in the blkio ns (it could already exist) */
user_cgroup_path, /* *\/ */
uid, gid) != XCGROUP_SUCCESS) { /* if (xcgroup_create(&blkio_ns, &user_blkio_cg, */
error("jobacct_gather/cgroup: unable to create user %u blkio " /* user_cgroup_path, */
"cgroup", uid); /* uid, gid) != XCGROUP_SUCCESS) { */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create user %u blkio " */
goto error; /* "cgroup", uid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
if (xcgroup_instanciate(&user_blkio_cg) != XCGROUP_SUCCESS) { /* } */
xcgroup_destroy(&user_blkio_cg);
error("jobacct_gather/cgroup: unable to instanciate user %u " /* if (xcgroup_instanciate(&user_blkio_cg) != XCGROUP_SUCCESS) { */
"blkio cgroup", uid); /* xcgroup_destroy(&user_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to instanciate user %u " */
goto error; /* "blkio cgroup", uid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
/* /* } */
* Create job cgroup in the blkio ns (it could already exist)
*/ /* /\* */
if (xcgroup_create(&blkio_ns, &job_blkio_cg, /* * Create job cgroup in the blkio ns (it could already exist) */
job_cgroup_path, /* *\/ */
uid, gid) != XCGROUP_SUCCESS) { /* if (xcgroup_create(&blkio_ns, &job_blkio_cg, */
xcgroup_destroy(&user_blkio_cg); /* job_cgroup_path, */
error("jobacct_gather/cgroup: unable to create job %u blkio " /* uid, gid) != XCGROUP_SUCCESS) { */
"cgroup", jobid); /* xcgroup_destroy(&user_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create job %u blkio " */
goto error; /* "cgroup", jobid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
if (xcgroup_instanciate(&job_blkio_cg) != XCGROUP_SUCCESS) { /* } */
xcgroup_destroy(&user_blkio_cg);
xcgroup_destroy(&job_blkio_cg); /* if (xcgroup_instanciate(&job_blkio_cg) != XCGROUP_SUCCESS) { */
error("jobacct_gather/cgroup: unable to instanciate job %u " /* xcgroup_destroy(&user_blkio_cg); */
"blkio cgroup", jobid); /* xcgroup_destroy(&job_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to instanciate job %u " */
goto error; /* "blkio cgroup", jobid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
/* /* } */
* Create step cgroup in the blkio ns (it could already exist)
*/ /* /\* */
if (xcgroup_create(&blkio_ns, &step_blkio_cg, /* * Create step cgroup in the blkio ns (it could already exist) */
jobstep_cgroup_path, /* *\/ */
uid, gid) != XCGROUP_SUCCESS) { /* if (xcgroup_create(&blkio_ns, &step_blkio_cg, */
/* do not delete user/job cgroup as they can exist for other /* jobstep_cgroup_path, */
* steps, but release cgroup structures */ /* uid, gid) != XCGROUP_SUCCESS) { */
xcgroup_destroy(&user_blkio_cg); /* /\* do not delete user/job cgroup as they can exist for other */
xcgroup_destroy(&job_blkio_cg); /* * steps, but release cgroup structures *\/ */
error("jobacct_gather/cgroup: unable to create jobstep %u.%u " /* xcgroup_destroy(&user_blkio_cg); */
"blkio cgroup", jobid, stepid); /* xcgroup_destroy(&job_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create jobstep %u.%u " */
goto error; /* "blkio cgroup", jobid, stepid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
if (xcgroup_instanciate(&step_blkio_cg) != XCGROUP_SUCCESS) { /* } */
xcgroup_destroy(&user_blkio_cg);
xcgroup_destroy(&job_blkio_cg); /* if (xcgroup_instanciate(&step_blkio_cg) != XCGROUP_SUCCESS) { */
xcgroup_destroy(&step_blkio_cg); /* xcgroup_destroy(&user_blkio_cg); */
error("jobacct_gather/cgroup: unable to instantiate jobstep " /* xcgroup_destroy(&job_blkio_cg); */
"%u.%u blkio cgroup", jobid, stepid); /* xcgroup_destroy(&step_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to instantiate jobstep " */
goto error; /* "%u.%u blkio cgroup", jobid, stepid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
/* /* } */
* Create task cgroup in the blkio ns
*/ /* /\* */
if (xcgroup_create(&blkio_ns, &task_blkio_cg, /* * Create task cgroup in the blkio ns */
task_cgroup_path, /* *\/ */
uid, gid) != XCGROUP_SUCCESS) { /* if (xcgroup_create(&blkio_ns, &task_blkio_cg, */
/* do not delete user/job cgroup as they can exist for other /* task_cgroup_path, */
* steps, but release cgroup structures */ /* uid, gid) != XCGROUP_SUCCESS) { */
xcgroup_destroy(&user_blkio_cg); /* /\* do not delete user/job cgroup as they can exist for other */
xcgroup_destroy(&job_blkio_cg); /* * steps, but release cgroup structures *\/ */
error("jobacct_gather/cgroup: unable to create jobstep %u.%u " /* xcgroup_destroy(&user_blkio_cg); */
"task %u blkio cgroup", jobid, stepid, taskid); /* xcgroup_destroy(&job_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to create jobstep %u.%u " */
goto error; /* "task %u blkio cgroup", jobid, stepid, taskid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
if (xcgroup_instanciate(&task_blkio_cg) != XCGROUP_SUCCESS) { /* } */
xcgroup_destroy(&user_blkio_cg);
xcgroup_destroy(&job_blkio_cg); /* if (xcgroup_instanciate(&task_blkio_cg) != XCGROUP_SUCCESS) { */
xcgroup_destroy(&step_blkio_cg); /* xcgroup_destroy(&user_blkio_cg); */
error("jobacct_gather/cgroup: unable to instantiate jobstep " /* xcgroup_destroy(&job_blkio_cg); */
"%u.%u task %u blkio cgroup", jobid, stepid, taskid); /* xcgroup_destroy(&step_blkio_cg); */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to instantiate jobstep " */
goto error; /* "%u.%u task %u blkio cgroup", jobid, stepid, taskid); */
} /* fstatus = SLURM_ERROR; */
/* goto error; */
/* /* } */
* Attach the slurmstepd to the task blkio cgroup
*/ /* /\* */
rc = xcgroup_add_pids(&task_blkio_cg, &pid, 1); /* * Attach the slurmstepd to the task blkio cgroup */
if (rc != XCGROUP_SUCCESS) { /* *\/ */
error("jobacct_gather/cgroup: unable to add slurmstepd to " /* rc = xcgroup_add_pids(&task_blkio_cg, &pid, 1); */
"blkio cg '%s'", task_blkio_cg.path); /* if (rc != XCGROUP_SUCCESS) { */
fstatus = SLURM_ERROR; /* error("jobacct_gather/cgroup: unable to add slurmstepd to " */
} else /* "blkio cg '%s'", task_blkio_cg.path); */
fstatus = SLURM_SUCCESS; /* fstatus = SLURM_ERROR; */
/* } else */
error: /* fstatus = SLURM_SUCCESS; */
xcgroup_unlock(&blkio_cg);
xcgroup_destroy(&blkio_cg); /* error: */
return fstatus; /* xcgroup_unlock(&blkio_cg); */
} /* xcgroup_destroy(&blkio_cg); */
/* return fstatus; */
/* } */
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