File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -467,10 +467,6 @@ void THarmonizer::HarmonizeImpl(ui64 ts) {
467
467
if (budget < -0.1 ) {
468
468
isStarvedPresent = true ;
469
469
}
470
- for (size_t poolIdx = 0 ; poolIdx < Pools.size (); ++poolIdx) {
471
- TPoolInfo& pool = Pools[poolIdx];
472
- AtomicSet (pool.PotentialMaxThreadCount , Min (pool.MaxThreadCount , budgetInt));
473
- }
474
470
double overbooked = consumed - booked;
475
471
if (overbooked < 0 ) {
476
472
isStarvedPresent = false ;
@@ -591,6 +587,11 @@ void THarmonizer::HarmonizeImpl(ui64 ts) {
591
587
pool.SetThreadCount (threadCount - 1 );
592
588
}
593
589
}
590
+
591
+ for (size_t poolIdx = 0 ; poolIdx < Pools.size (); ++poolIdx) {
592
+ TPoolInfo& pool = Pools[poolIdx];
593
+ AtomicSet (pool.PotentialMaxThreadCount , std::min<i64>(pool.MaxThreadCount , pool.GetThreadCount () + budgetInt));
594
+ }
594
595
}
595
596
596
597
void THarmonizer::CalculatePriorityOrder () {
You can’t perform that action at this time.
0 commit comments