}
} 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;
}
}