Skip to content

Commit 7f2f5b0

Browse files
committed
#2382: temperedlb: explain 100 microsecond delay when a lock cycle is found
1 parent 36d2466 commit 7f2f5b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vt/vrt/collection/balance/temperedlb/temperedlb.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,6 +2590,9 @@ void TemperedLB::satisfyLockRequest() {
25902590
try_locks_.erase(iter);
25912591

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

0 commit comments

Comments
 (0)