[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH] starvation: Do not give up if there are other jobs running


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Wed, 26 Jun 2019 11:45:54 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 26 Jun 2019 10:46:36 +0000
  • Ironport-sdr: gOuGfxEWyuIxSjy8R5kXMsPQeuwWWdob2xfYfHRIF9mGHLuFXutpRbb7Cw2HmNfH0szGJQVKl9 PojtA9sCY9MyHX7nWhQCXvOdHGvWCwups7gUYi8jc0YjUSAZ9oW/J6j2nL0xs8KKYcaUNqWLPx chRJrkWGFgEONUO8a3wW6dA55gw9ub3qYm7SYSvs0QrtZnEkSWl/SGZRKQ1G4xgRpBpKqEbzXY 2mx7mg8O+Feitogt+vugXEuQDPR1ac/smCByannS8f8eky1ZfJSIHXAnYJdI2FTfGD1g5RCRHW E+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We want those other jobs to finish so that we can include the time
they took, and the fact that they completed, in our calculations.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-hosts-allocate-Executive | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 6b3da600..079ef1d1 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -788,9 +788,17 @@ sub starving ($$) {
     my $maxfin=0;
     while (my ($j,$st,$fin) = $starvation_q->fetchrow_array()) {
        if ($st eq 'preparing' ||
-           $st eq 'queued' ||
-           $st eq 'running') {
+           $st eq 'queued') {
            $w++;
+       } elsif ($st eq 'running') {
+           # We don't quit if there are still jobs running.  Instead
+           # we wait until they are done and then see if how much we
+           # would be delaying their results.  This does mean that a
+           # flight can be kept going, rather than being treated as
+           # starved, by a constant trickle of late jobs.  But that
+           # 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 {
            $d++;
            return (0, "job $j status $st but no step finished time!")
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.