if (!is_pressure_supported())
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Pressure Stall Information (PSI) is not supported");
- r = cg_all_unified();
- if (r < 0)
- return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m");
- if (r == 0)
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Requires the unified cgroups hierarchy");
-
r = cg_mask_supported(&mask);
if (r < 0)
return log_error_errno(r, "Failed to get supported cgroup controllers: %m");
if (geteuid() != 0)
return (void) log_tests_skipped("not root");
- if (cg_all_unified() <= 0)
- return (void) log_tests_skipped("cgroups are not running in unified mode");
-
assert_se(cg_pid_get_path(NULL, 0, &cgroup_root) >= 0);
/* Create another cgroup below this one for the pids we forked off. We need this to be managed
if (!is_pressure_supported())
return (void) log_tests_skipped("system does not support pressure");
- if (cg_all_unified() <= 0)
- return (void) log_tests_skipped("cgroups are not running in unified mode");
-
assert_se(cg_mask_supported(&mask) >= 0);
if (!FLAGS_SET(mask, CGROUP_MASK_MEMORY))
if (!is_pressure_supported())
return (void) log_tests_skipped("system does not support pressure");
- if (cg_all_unified() <= 0)
- return (void) log_tests_skipped("cgroups are not running in unified mode");
-
assert_se(cg_mask_supported(&mask) >= 0);
if (!FLAGS_SET(mask, CGROUP_MASK_MEMORY))
After=swap.target
Before=multi-user.target shutdown.target
Conflicts=shutdown.target
-ConditionControlGroupController=v2
ConditionControlGroupController=memory
ConditionPathExists=/proc/pressure/cpu
ConditionPathExists=/proc/pressure/io
DefaultDependencies=no
Before=sockets.target shutdown.target
Conflicts=shutdown.target
-ConditionControlGroupController=v2
ConditionControlGroupController=memory
ConditionPathExists=/proc/pressure/cpu
ConditionPathExists=/proc/pressure/io