@@ -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}),