Skip to content

Commit

Permalink
#2382: temperedlb: explain 100 microsecond delay when a lock cycle is…
Browse files Browse the repository at this point in the history
… found
  • Loading branch information
lifflander committed Feb 25, 2025
1 parent 36d2466 commit 7f2f5b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,9 @@ void TemperedLB::satisfyLockRequest() {
try_locks_.erase(iter);

if (lock.forced_release) {
// Delay for 100 microseconds to give another rank a chance at obtaining a
// lock so the cycle isn't just created again. This number was found
// to be reasonable through some experimentation.
std::this_thread::sleep_for(std::chrono::microseconds(100));
lock.forced_release = false;
try_locks_.insert(lock);
Expand Down

0 comments on commit 7f2f5b0

Please sign in to comment.