Skip to content

Commit 0fc0ed8

Browse files
authored
Consolidate ack checking (#1561)
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.
1 parent 8a7091a commit 0fc0ed8

File tree

4 files changed

+196
-373
lines changed

4 files changed

+196
-373
lines changed

tools/dtrace/perf-upstairs-wf.d

+2-11
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,10 @@ crucible_upstairs*:::up-to-ds-write-start
2424
substart[arg0] = timestamp;
2525
}
2626

27-
crucible_upstairs*:::up-to-ds-flush-done,
28-
crucible_upstairs*:::up-to-ds-write-done
27+
crucible_upstairs*:::gw-flush-done,
28+
crucible_upstairs*:::gw-write-done
2929
/substart[arg0]/
3030
{
3131
@[probename] = quantize(timestamp - substart[arg0]);
3232
substart[arg0] = 0;
33-
final[arg0] = timestamp;
34-
}
35-
36-
crucible_upstairs*:::gw-flush-done,
37-
crucible_upstairs*:::gw-write-done
38-
/final[arg0]/
39-
{
40-
@[probename] = quantize(timestamp - final[arg0]);
41-
final[arg0] = 0;
4233
}

0 commit comments

Comments
 (0)