Use mount and umount syscalls when handling cgroup namespaces.
Using the syscalls directly rather than calling bin/(u)mount via system() avoids a few fork + exec calls, and provides better error handling if something goes wrong. Users of this functionality are also updated to use slurm_strerror in order to provide a more informative error message. The mount and umount syscalls are Linux-specific, but so are cgroups so no portability is lost.
Showing
- NEWS 2 additions, 0 deletionsNEWS
- src/common/xcgroup.c 21 additions, 31 deletionssrc/common/xcgroup.c
- src/common/xcgroup.h 4 additions, 0 deletionssrc/common/xcgroup.h
- src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup_cpuacct.c 2 additions, 1 deletion...ins/jobacct_gather/cgroup/jobacct_gather_cgroup_cpuacct.c
- src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup_memory.c 2 additions, 1 deletion...gins/jobacct_gather/cgroup/jobacct_gather_cgroup_memory.c
- src/plugins/proctrack/cgroup/proctrack_cgroup.c 2 additions, 1 deletionsrc/plugins/proctrack/cgroup/proctrack_cgroup.c
- src/plugins/task/cgroup/task_cgroup_cpuset.c 1 addition, 1 deletionsrc/plugins/task/cgroup/task_cgroup_cpuset.c
- src/plugins/task/cgroup/task_cgroup_devices.c 1 addition, 1 deletionsrc/plugins/task/cgroup/task_cgroup_devices.c
- src/plugins/task/cgroup/task_cgroup_memory.c 1 addition, 1 deletionsrc/plugins/task/cgroup/task_cgroup_memory.c
Loading
Please register or sign in to comment