oom: add unit file settings for oomd avoid/omit xattrs

This commit is contained in:
Anita Zhang
2021-02-12 12:45:36 -08:00
parent 59331b8e29
commit 4e806bfa9f
11 changed files with 94 additions and 10 deletions
+4
View File
@@ -4706,6 +4706,10 @@ int exec_spawn(Unit *unit,
r = cg_create(SYSTEMD_CGROUP_CONTROLLER, subcgroup_path);
if (r < 0)
return log_unit_error_errno(unit, r, "Failed to create control group '%s': %m", subcgroup_path);
/* Normally we would not propagate the oomd xattrs to children but since we created this
* sub-cgroup internally we should do it. */
cgroup_oomd_xattr_apply(unit, subcgroup_path);
}
}