docs: the reseq probe's readings, and the invariants resequencing changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
4549c622fc
commit
eacb3f5efc
11 files changed
+258
-23
No files matched your search
@@ -140,12 +140,18 @@ cannot be misdiagnosed.
|
||||
`todo.md` requires absolute stream time to remain available for export. There is exactly one f64
|
||||
time ring per `BufferStore`, shared by every channel of that buffer, and relative mode takes it.
|
||||
Export therefore needs a **second** f64 ring carrying the absolute stamp under the same group-mean
|
||||
rule, written in relative mode only and read by export and by nothing else — eight bytes per
|
||||
stored slot.
|
||||
rule, written in **relative mode only** and read by export and by nothing else — eight bytes per
|
||||
stored slot. The absolute ring is not kept unconditionally; it is budgeted along with the main
|
||||
ring and the value rings, which is why it halves the retained span rather than costing a
|
||||
proportional fraction (see SPECS.md for the measured figures and the power-of-two explanation).
|
||||
|
||||
This cost is paid rather than avoided. Without it, selecting relative mode silently degrades the
|
||||
one output `todo.md` says must keep absolute time.
|
||||
|
||||
The measured history cost: **83.886 s** in stream mode and **41.943 s** in relative mode, at
|
||||
100 kS/s, 4 channels, `--buffer-mb 200`. The plan's ~22% figure and the per-byte 75% figure are
|
||||
both wrong because `Partition::time_capacity` is floored to a power of two.
|
||||
|
||||
## The receive path
|
||||
|
||||
### In the client: a reorder ring of reassembled payloads
|
||||
@@ -226,9 +232,11 @@ thread folds what was pushed into the pyramid. That split carries straight over
|
||||
`[produced_ - capacity, produced_)`, a single relaxed store. The same race class as a push, and
|
||||
an `f32` cannot tear. Measurements and export read the ring directly, so they see a repair
|
||||
immediately.
|
||||
- **Pyramid amend — main thread, inside `acquire()`.** The producer enqueues `(slot, value)` on an
|
||||
SPSC queue; `ChannelBuffer::acquire()` drains it **after** its append pass, so every amended
|
||||
index is already published.
|
||||
- **Pyramid amend — main thread, inside `acquire()`.** The producer appends amended `(slot, value)`
|
||||
pairs to a plain `std::vector<Amend>` member; `ChannelBuffer::acquire()` drains it **after** its
|
||||
append pass, so every amended index is already published. No SPSC queue is needed: `acquire()` is
|
||||
called under `model.mutex()` and the producer holds that same mutex for all of `on_data`, so the
|
||||
vector is correctly serialised without lock-free machinery.
|
||||
|
||||
The thread split is not a stylistic choice. A bucket is 32 bytes and is not atomic, so amending it
|
||||
from the producer would let a reader see a half-updated bucket whose `sum` does not match its
|
||||
|
||||
Reference in new issue
Block a user