From: Ian Jackson Date: Thu, 22 Oct 2020 14:38:12 +0000 (+0100) Subject: starvation: Do not count more than half a flight as starved X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=eec31fe3e2469e0166c56617b5147ba9db302e92;p=osstest.git starvation: Do not count more than half a flight as starved This seems like a sensible rule. This also prevents the following bizarre behaviour: when a flight has a handful of jobs that cannot be run at all (eg because it's a commissioning flight for only hosts of a particular arch), those jobs can complete quite quickly. Even with a high X value because only a smallish portion of the flight has finished, this can lead to a modest threshhold value. This combines particularly badly with commissioning flights, where the duraation estimates are often nonsense. Signed-off-by: Ian Jackson --- diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index b216186..459b921 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -863,7 +863,7 @@ sub starving ($$) { "D=%d W=%d X=%.3f t_D=%s t_me=%s t_lim=%.3f X'=%.4f (fi.s=%s)", $d, $w, $X, $total_d, $projected_me, $lim, $Xcmp, $fi->{started} - $now; - my $bad = $projected_me > $lim; + my $bad = $projected_me > $lim && $d >= $w; return ($bad, $m); }