From: Ian Jackson Date: Wed, 22 Nov 2017 11:38:05 +0000 (+0000) Subject: host reuse: Jiggle the infra-priority a bit, within a flight X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d8213bee7a4e5ca347e47e799a1b4098201cc148;p=osstest.git host reuse: Jiggle the infra-priority a bit, within a flight Signed-off-by: Ian Jackson --- diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index a50f8bf..c1002fc 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -733,8 +733,13 @@ sub alloc_hosts () { ? -10000 : -10 * @hids; - my $infrapriority = - ($r{hosts_infraprioritygroup} // '') =~ m/^(\d+):/ ? $1 : undef; + my $infrapriority; + if (($r{hosts_infraprioritygroup} // '') =~ m/^(\d+):/) { + $infrapriority = ($1 * 100) + ($$ % 100); + # $$ provides a pseudorandom element, which arranges that jobs + # in a group roughly take turns to take the scheduling lead, + # which will hopefully help them converge. + } my $ok = alloc_resources(WaitStart => ($ENV{OSSTEST_RESOURCE_WAITSTART} || $fi->{started}),