From: Ian Jackson <iwj@xenproject.org>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <iwj@xenproject.org>
Subject: [OSSTEST PATCH 2/3] host allocation: Check "job class" too
Date: Mon, 7 Jun 2021 16:16:13 +0100 [thread overview]
Message-ID: <20210607151614.14132-2-iwj@xenproject.org> (raw)
In-Reply-To: <20210607151614.14132-1-iwj@xenproject.org>
That is all jobs which start with the same \w* as this job.
Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
ts-hosts-allocate-Executive | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 9722ce12..849bc97b 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -937,12 +937,20 @@ sub attempt_allocation {
}
} elsif (%$starvation_p) {
my $est_abs = most_optimistic($best, $now, $starvation_p->{I});
- my ($starving, $m) = starving($est_abs, $now, 0);
+ my $all_starving = 1;
+ foreach my $thisclass (qw(1 0)) {
+ my $tcdesc = $thisclass ? 'class' : 'flight';
+ my ($starving, $m) = starving($est_abs, $now, $thisclass);
+ if (!$starving) {
+ print DEBUG "not starving ($tcdesc): $m\n";
+ $all_starving = 0;
+ last;
+ } else {
+ logm "starving ($tcdesc) ($m)";
+ }
+ }
$starvation_q->finish();
- if (!$starving) {
- print DEBUG "not starving: $m\n";
- } else {
- logm "starving ($m)";
+ if ($all_starving) {
return $alloc_starved_r;
}
}
--
2.20.1
next prev parent reply other threads:[~2021-06-07 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 15:16 [OSSTEST PATCH 1/3] host allocation: Prepare for further starvation check Ian Jackson
2021-06-07 15:16 ` Ian Jackson [this message]
2021-06-07 15:16 ` [OSSTEST PATCH 3/3] host allocation: Avoid starving out failing tests Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210607151614.14132-2-iwj@xenproject.org \
--to=iwj@xenproject.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.