You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2015/09/15 02:26:53 UTC
[6/7] mesos git commit: Removed hard-coded reap interval from perf
event isolator.
Removed hard-coded reap interval from perf event isolator.
Review: https://reviews.apache.org/r/38381
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/72f84529
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/72f84529
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/72f84529
Branch: refs/heads/master
Commit: 72f8452918a50f73071f168ec85bfd80ac43a639
Parents: a7a745d
Author: Benjamin Mahler <be...@gmail.com>
Authored: Mon Sep 14 14:41:21 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Sep 14 17:04:45 2015 -0700
----------------------------------------------------------------------
src/slave/containerizer/isolators/cgroups/perf_event.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/72f84529/src/slave/containerizer/isolators/cgroups/perf_event.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/perf_event.cpp b/src/slave/containerizer/isolators/cgroups/perf_event.cpp
index dc8d3b1..f6ab8bc 100644
--- a/src/slave/containerizer/isolators/cgroups/perf_event.cpp
+++ b/src/slave/containerizer/isolators/cgroups/perf_event.cpp
@@ -28,6 +28,7 @@
#include <process/delay.hpp>
#include <process/io.hpp>
#include <process/pid.hpp>
+#include <process/reap.hpp>
#include <process/subprocess.hpp>
#include <stout/bytes.hpp>
@@ -383,11 +384,10 @@ void CgroupsPerfEventIsolatorProcess::sample()
}
// The timeout includes an allowance of twice the process::reap
- // interval (currently one second) to ensure we see the perf
- // process exit. If the sample is not ready after the timeout
- // something very unexpected has occurred so we discard it and
- // halt all sampling.
- Duration timeout = flags.perf_duration + Seconds(2);
+ // interval to ensure we see the perf process exit. If the sample
+ // is not ready after the timeout something very unexpected has
+ // occurred so we discard it and halt all sampling.
+ Duration timeout = flags.perf_duration + process::MAX_REAP_INTERVAL() * 2;
perf::sample(events, cgroups, flags.perf_duration)
.after(timeout,