Skip to content

Commit

Permalink
Minor adjustments to timetracing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnousterhout committed Jul 16, 2024
1 parent d54f304 commit 0cb8533
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions homa_grant.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ void homa_grant_check_rpc(struct homa_rpc *rpc)
if ((rpc->msgin.length < 0) || (rpc->state == RPC_DEAD)
|| (rpc->msgin.num_bpages <= 0)) {
homa_rpc_unlock(rpc);
return;
goto done;
}

if (rpc->msgin.granted >= rpc->msgin.length) {
homa_grant_update_incoming(rpc,homa);
homa_rpc_unlock(rpc);
return;
goto done;
}

tt_record4("homa_grant_check_rpc starting for id %d, granted %d, "
Expand All @@ -309,7 +309,7 @@ void homa_grant_check_rpc(struct homa_rpc *rpc)
homa_grant_recalc(homa, 1);
else
homa_grantable_unlock(homa);
return;
goto done;
}

/* Not a new message; see if we can upgrade the message's priority. */
Expand All @@ -324,7 +324,7 @@ void homa_grant_check_rpc(struct homa_rpc *rpc)
} else {
homa_rpc_unlock(rpc);
}
return;
goto done;
}
atomic_set(&homa->active_remaining[rank], rpc->msgin.bytes_remaining);
if ((rank > 0) && (rpc->msgin.bytes_remaining < atomic_read(
Expand All @@ -333,7 +333,7 @@ void homa_grant_check_rpc(struct homa_rpc *rpc)
homa_rpc_unlock(rpc);
INC_METRIC(grant_priority_bumps, 1);
homa_grant_recalc(homa, 0);
return;
goto done;
}

/* Getting here should be the normal case: see if we can send a new
Expand All @@ -348,12 +348,14 @@ void homa_grant_check_rpc(struct homa_rpc *rpc)
homa_grantable_lock(homa, 0);
homa_grant_remove_rpc(rpc);
homa_grant_recalc(homa, 1);
return;
goto done;
}

homa_rpc_unlock(rpc);
if (recalc)
homa_grant_recalc(homa, 0);
done:
tt_record1("homa_grant_check_rpc finished with id %d", rpc->id);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions homa_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ void homa_check_rpc(struct homa_rpc *rpc)
tt_record3("RPC id %d, peer 0x%x, aborted because of timeout, "
"state %d",
rpc->id, tt_addr(rpc->peer->addr), rpc->state);
// homa_rpc_log_active_tt(homa, 0);
// tt_record1("Freezing because of RPC abort (id %d)", rpc->id);
// homa_freeze_peers(homa);
// tt_freeze();
homa_rpc_log_active_tt(homa, 0);
tt_record1("Freezing because of RPC abort (id %d)", rpc->id);
homa_freeze_peers(homa);
tt_freeze();
if (homa->verbose)
printk(KERN_NOTICE "RPC id %llu, peer %s, aborted "
"because of timeout, state %d\n",
Expand Down

0 comments on commit 0cb8533

Please sign in to comment.