xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH] starvation: Only count "pass" and "fail" as done jobs
@ 2021-11-03 12:46 Ian Jackson
  0 siblings, 0 replies; only message in thread
From: Ian Jackson @ 2021-11-03 12:46 UTC (permalink / raw)
  To: xen-devel

Release implications: I have eyeballed this again and the effect is to
treat some things as not starved as described.  This may make some
additional tests run but only in a good way.  So, formally:
Release-Acked-by: Ian Jackson <iwj@xenproject.org>

From 4a62c669ba9d7635caeac02b0a925bb05199f72a Mon Sep 17 00:00:00 2001
From: Ian Jackson <iwj@xenproject.org>
Subject: [OSSTEST PATCH] starvation: Only count "pass" and "fail" as done jobs
Date: Tue, 12 Oct 2021 18:25:59 +0100

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>
---
 Osstest/Executive.pm        | 3 ++-
 ts-hosts-allocate-Executive | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index d95d848dc..9d7c71369 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -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
diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 4dfcd0cd1..19047d49e 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-03 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 12:46 [OSSTEST PATCH] starvation: Only count "pass" and "fail" as done jobs Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).