Skip to content

Commit

Permalink
Consolidate ack checking (#1561)
Browse files Browse the repository at this point in the history
There are a bunch of places where we check to see if jobs should be
acked and/or retired:

- `Downstairs::enqueue` (if skipped on all three Downstairs)
- `Downstairs::skip_all_jobs` (for skipped jobs only)
- `DownstairsClient::process_io_completion` (lots of conditionals to
decide if we're ready to ack; returns a flag to
`Downstairs::process_io_completion_inner`)

This PR consolidates ack and retire checks into a single place:
`Downstairs::ack_check`. This new function is responsible for deciding
when to ack and retire jobs; it's called in all of the places where
you'd expect.

`DownstairsClient::process_io_completion` is reorganized, with one minor
logical change: non-fatal read errors now increment the
`downstairs_errors` counter. It's no longer responsible for deciding
when to ack a job; that's now in `Downstairs::ack_check`.

The `up-to-ds-*-done` DTrace probes are removed, because (after #1552)
they fire immediately before the equivalent `gw-*-done` probes; there's
no delay waiting for ackable jobs to be acked.
  • Loading branch information
mkeeter authored Nov 18, 2024
1 parent 8a7091a commit 0fc0ed8
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 373 deletions.
13 changes: 2 additions & 11 deletions tools/dtrace/perf-upstairs-wf.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,10 @@ crucible_upstairs*:::up-to-ds-write-start
substart[arg0] = timestamp;
}

crucible_upstairs*:::up-to-ds-flush-done,
crucible_upstairs*:::up-to-ds-write-done
crucible_upstairs*:::gw-flush-done,
crucible_upstairs*:::gw-write-done
/substart[arg0]/
{
@[probename] = quantize(timestamp - substart[arg0]);
substart[arg0] = 0;
final[arg0] = timestamp;
}

crucible_upstairs*:::gw-flush-done,
crucible_upstairs*:::gw-write-done
/final[arg0]/
{
@[probename] = quantize(timestamp - final[arg0]);
final[arg0] = 0;
}
Loading

0 comments on commit 0fc0ed8

Please sign in to comment.