Skip to content

Commit 01340a8

Browse files
docs(roadmap): read-path residual root-caused — kernel close-time STATX_BLOCKS invalidation under writeback cache; accepted as floor
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent a559b8d commit 01340a8

2 files changed

Lines changed: 6 additions & 1 deletion

.agents/specs/2026-06-11-per-phase-1-5x-roadmap-read-ttls-per-request-cost-native-bulk-ingest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ until re-verified against codex.
3939
| diff | 0.45x (80ms) | **0.05x** ✓ (18ms) | 0.04x ✓ | ≤1.5x **MET** |
4040
| edit | 7ms abs | **6ms abs** | 8ms | ≤3ms absolute miss |
4141
| fsck | 0.98x | **0.83x**| 0.88x ✓ | hold **MET** |
42-
| read-path warm (protocol) | 2.26x | 2.38x (paired 0.984, neutral) | 2.14x (paired 0.972) | ≤1.5x miss |
42+
| read-path warm (protocol) | 2.26x | 2.38x (paired 0.984, neutral) | 2.14x (paired 0.972) | ≤1.5x miss — floor: kernel close-time STATX_BLOCKS inval under writeback cache forces 1 GETATTR RT per stat-after-close (see WS9 notes 07-03); userspace-unfixable, upstream patch is the path |
4343
| TOTAL workload | 4.08x | **3.37x** | 2.92x (stdev 0.12) ||
4444

4545
**WS9 verdict (final, 2026-07-03)**: GO bar (read_search ≤1.5x AND no phase

.agents/specs/2026-06-12-enosys-open-eliminate-open-release-round-trips-via-kernel-no_open.notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ User comment: none
4040
**Type**: decision
4141
**Context**: Idle-host codex re-runs (multi n=5, warmup 1, canonical-fixture default) after the 07-02 synthetic-fixture correction. noopen off vs default: read_search 1.87x -> 1.41x (bar <=1.5x MET; p25 1.24 p75 1.63), status 1.10x -> 0.93x, fsck 0.98x -> 0.83x, checkout 0.49x -> 0.42x, diff 80ms -> 18ms, clone -10% wall, edit ~6ms, total 4.08x -> 3.37x. No phase regression. Read-path warm protocol (--modes warm --repeated-read-iterations 32 --repeated-read-files 32, 4 alternating rounds x 3 arms): off 2.26x, default 2.38x (paired 0.984, neutral), +uring 2.14x (paired 0.972).
4242
**Resolution**: WS9 default-on promotion is FINAL — the written GO bar is met on the canonical workload. Scoreboard: 5 of 8 phases at/under 1.5x. uring compound on codex is equal-or-better on every phase (total 2.92x, status 0.60x, clone -3%, stdev 0.12): the 07-02 synthetic "write-phase regression" was a toy-workload artifact; uring remains opt-in only because it needs the root sysctl (probe-gated fallback exists) — default-flip raised to the user.
43+
44+
## 2026-07-03T11:30-07:00 — Read-path residual root-caused: kernel close-time STATX_BLOCKS invalidation (userspace-unfixable)
45+
**Type**: decision
46+
**Context**: Step-through isolation of the warm stat+open/read/close loop (32 files x 32 iters, profiled per-op): 1057 GETATTRs for 1024 cycles despite 10s attr TTLs. Variant matrix pinned the invalidator: stat-only 1.3us/cycle (TTL works), read-on-persistent-fd + stat 2.2us (clean, 65 GETATTRs), stat+open/close WITHOUT read = full storm (so not atime-on-read), statx excluding only ATIME still storms, statx excluding STATX_BLOCKS -> 33 GETATTRs and 3.6us/cycle. Mechanism: under writeback_cache the kernel's fuse_flush() invalidates STATX_BLOCKS at every close(2) (i_blocks is not kernel-maintained); plain stat() requests basic stats including BLOCKS, so every stat-after-close forces a sync FUSE_GETATTR round trip. FOPEN_NOFLUSH cannot skip it (early return is gated on !writeback_cache) and no_open has no per-open flags anyway; our ENOSYS-FLUSH only suppresses the FLUSH request, not the kernel-local invalidation.
47+
**Resolution**: Accepted as the read-path warm floor: ~1 GETATTR RT per stat-after-close cycle (~2.1-2.4x on the read-path protocol; the adapter serves the GETATTR from its attr cache at ~2.2us, the cost is the round trip itself — uring already trims it). Userspace levers are exhausted; the proper fix is an upstream kernel patch (skip the STATX_BLOCKS invalidation when the fuse file saw no writes) — filed as a possible future contribution. Callers using statx without STATX_BLOCKS (or AT_STATX_DONT_SYNC) avoid the storm entirely today.

0 commit comments

Comments
 (0)