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 <iwj@xenproject.org>
"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);
}