[Swift-commit] r6394 - branches/faster/src/org/griphyn/vdl/karajan

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Mar 18 03:05:18 CDT 2013


Author: hategan
Date: 2013-03-18 03:04:48 -0500 (Mon, 18 Mar 2013)
New Revision: 6394

Modified:
   branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java
Log:
check not only if the scheduler is running threads, but also if no time slices have completed since the last check to avoid triggering the hang checker if stuff is actually happening

Modified: branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java	2013-03-18 05:05:23 UTC (rev 6393)
+++ branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java	2013-03-18 08:04:48 UTC (rev 6394)
@@ -50,6 +50,7 @@
     public static final int MAX_CYCLES = 10;
     private Timer timer;
     private Context context;
+    private long lastSequenceNumber;
     
     public HangChecker(Context context) throws ExecutionException {
     	this.context = context;
@@ -62,6 +63,11 @@
 
     public void run() {
         try {
+            long crtSequenceNumber = Scheduler.getScheduler().getSequenceId();
+            if (crtSequenceNumber != lastSequenceNumber) {
+                lastSequenceNumber = crtSequenceNumber;
+                return;
+            }
             WeightedHostScoreScheduler s = (WeightedHostScoreScheduler) context.getAttribute(SchedulerNode.CONTEXT_ATTR_NAME);
             if (s != null) {
                 int running = s.getRunning();




More information about the Swift-commit mailing list