]> xenbits.xensource.com Git - osstest.git/commitdiff
starvation: Only count "pass" and "fail" as done jobs
authorIan Jackson <iwj@xenproject.org>
Tue, 12 Oct 2021 17:25:59 +0000 (18:25 +0100)
committerIan Jackson <iwj@xenproject.org>
Mon, 6 Dec 2021 18:17:13 +0000 (18:17 +0000)
The main effect is to treat "broken" and "blocked" jobs as not part of
the flight for starvation calculations.

This is correct for commissioning flights and OK for other flights.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Osstest/Executive.pm
ts-hosts-allocate-Executive

index d95d848dcdb567acdf2bdd3c9e956a574ab510a7..9d7c7136989afcf18c6ece0a8c260c729200ecc5 100644 (file)
@@ -1148,7 +1148,8 @@ END
 #        to allow for slow jobs, compared to other jobs
 #    W   number of jobs waiting - strictly, jobs in states
 #          preparing queued running
-#    D   number of jobs done - strictly, other states
+#    D   number of jobs done - strictly, jobs in states
+#          pass fail
 #  tuning parameters:
 #    Xt  X when D=9 W=1, ie cancel one job out of ten
 #    Xh  X when D=1 W=1, ie cancel one job out of two
index 4dfcd0cd1a2fd1e7fb3c6a3fa7474fcd70a25bca..19047d49ecd8b2d2301ed2712b3ca9d825193769 100755 (executable)
@@ -846,11 +846,14 @@ sub starving ($$$) {
            # is indistinguishable from a flight which is at the head
            # of the queue for a small set of resources.
            return (0, "job $j status $st, don't give up just yet");
-       } else {
+       } elsif ($st eq 'pass' ||
+                $st eq 'fail') {
            $d++;
            return (0, "job $j status $st but no step finished time!")
                unless defined $fin;
            $maxfin = $fin if $fin > $maxfin;
+       } else {
+           # disregard - neither W or D
        }
     }
     # we quit if the total time from the start of the flight