Skip to content

Commit

Permalink
#2201: temperedlb: add ordered locking protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Dec 18, 2023
1 parent 3c1e7dc commit c685575
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ void TemperedLB::giveCluster(

void TemperedLB::releaseLock() {
vt_debug_print(
verbose, temperedlb,
normal, temperedlb,
"releaseLock: pending size={}\n",
pending_actions_.size()
);
Expand Down Expand Up @@ -2081,11 +2081,13 @@ void TemperedLB::lockObtained(LockedInfoMsg* in_msg) {
theTerm()->consume(cur_epoch);
};

if (is_locked_) {
if (is_locked_ && locking_rank_ <= msg->locked_node) {
proxy_[msg->locked_node].template send<&TemperedLB::releaseLock>();
theTerm()->consume(cur_epoch);
try_locks_.emplace(msg->locked_node, msg->locked_c_try);
//pending_actions_.push_back(action);
} else if (is_locked_) {
pending_actions_.push_back(action);
} else if (is_swapping_) {
pending_actions_.push_back(action);
} else {
Expand Down

0 comments on commit c685575

Please sign in to comment.