Field notes from the cave

ADR-0011: O_DIRECT — own the backing store, bypass the kernel page cache

Status: Proposed (2026-06-09) — inferred from the “override the backing store” thesis; flip to Accepted on operator confirmation.

Context

Project thesis (operator, 2026-06-09): Goblin overrides the OS backing store and caches in RAM the latency-sensitive part of each file itself, because it knows what the kernel page cache can’t — the head of each object is the latency-critical part. RAM is a fixed, command-line-specified, mlocked budget (ADR-0008) that Goblin manages. If the kernel page cache also manages the backing-store files, the two caches fight.

Decision (proposed)

Open all SSD/HDD backing files with O_DIRECT — bypass the kernel page cache entirely. The kernel collapses to a block transport: io_uring submit → DMA into our registered, locked buffers. Goblin owns caching (mlock’d head cache), read-ahead (the pipeline, ADR-0006), and eviction (multi-resource).

Rationale

Consequences