diff --git a/test/util/cgroup_util.cc b/test/util/cgroup_util.cc index dca02c6ce..ca9bc4d29 100644 --- a/test/util/cgroup_util.cc +++ b/test/util/cgroup_util.cc @@ -102,6 +102,11 @@ PosixError Cgroup::PollControlFileForChangeAfter( body(); + // The loop below iterates quickly and results in too many save-restore + // cycles. This can prevent tasks from being scheduled and incurring the + // resource usage this function is often waiting for, resulting in timeouts. + const DisableSave ds; + while (true) { ASSIGN_OR_RETURN_ERRNO(const int64_t current_value, ReadIntegerControlFile(name));