File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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) {
467467 if (budget < -0.1 ) {
468468 isStarvedPresent = true ;
469469 }
470- for (size_t poolIdx = 0 ; poolIdx < Pools.size (); ++poolIdx) {
471- TPoolInfo& pool = Pools[poolIdx];
472- AtomicSet (pool.PotentialMaxThreadCount , Min (pool.MaxThreadCount , budgetInt));
473- }
474470 double overbooked = consumed - booked;
475471 if (overbooked < 0 ) {
476472 isStarvedPresent = false ;
@@ -591,6 +587,11 @@ void THarmonizer::HarmonizeImpl(ui64 ts) {
591587 pool.SetThreadCount (threadCount - 1 );
592588 }
593589 }
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+ }
594595}
595596
596597void THarmonizer::CalculatePriorityOrder () {
You can’t perform that action at this time.
0 commit comments