Kairo v0.2.0
Kairo v0.2.0 adds the Stage 7 backend mapping scaffold (generic NVMe Streams/FDP/ZNS hooks with safe no-op fallback), followed by a Stage 7.5 hardening pass that audits every hook point, introduces a kairo_backend_caps abstraction, and refactors the benchmark.
The release also includes the Stage 6 placement/lifetime metadata layer, Stage 6.5 experiment harness hardening, foundation stack repairs, and CI/polish improvements across the repo.
Positioning
- internal RFC/POC
- experimental Linux kernel patch stack
- benchmark-driven validation
- AI KV-cache workload modeling for generic NVMe SSDs
- 9-patch RFC/POC series plus compile-targeted 4-patch foundation subset
- not intended for LKML submission at this stage
Highlights
Stage 7 — Generic NVMe Backend Mapping Scaffold
The 0008 patch introduces a neutral backend placement layer that converts Stage 6 lifetime/placement metadata into backend classes:
- \�num kairo_backend_class\ — SHORT_LIVED, SESSION_LOCAL, MODEL_LOCAL, RECOMPUTABLE, PERSISTENT
- \struct kairo_backend_hint\ with Streams/FDP/ZNS mapping fields and flags
- Feature-detected NVMe hooks (all return false until real detection is wired)
- Benchmark --backend-mode none|generic|streams|fdp|zns\ with mapping output fields
- 10 backend mapping scaffold counters added to 0009 sysfs patch
- Experiment script \scripts/run_stage7_backend_mapping_experiment.sh\ with 5 canonical cases
- Parser \scripts/parse_stage7_backend_summary.py\ with CSV and pretty-printed output
Stage 7.5 — NVMe Hook Audit and Mapping Hardening
A hardening pass over the Stage 7 scaffold:
- Hook-point analysis: each 0008 hook classified as \COMPILE-TARGET\ or \CONCEPTUAL-HOOK\ with compile-risk annotations across all 6 kernel files touched (blk_types.h, blk-mq.h, nvme.h, nvme.h driver, core.c, zns.c)
- **\struct kairo_backend_caps**: unified capability abstraction replacing three per-feature _supported()\ helpers; single
vme_kairo_get_backend_caps()\ replaces
vme_kairo_streams_supported(),
vme_kairo_fdp_supported(),
vme_kairo_zns_supported()\ - 0008 rewritten into sections A–H: organized by file and abstraction layer with annotation comments at each hook point
- Benchmark refactor: 5 individual backend helpers consolidated into \kairo_compute_backend_model()\ returning \struct kairo_backend_model\
- **\docs/stage7_5_nvme_hook_audit.md**: detailed analysis of each hook point against real Linux 6.8 kernel symbols
- **\kernel/integration/linux-6.8/audit_nvme_hooks.sh**: checks a real Linux 6.8 tree for candidate symbols and confirms Kairo symbols are absent from stock
- **\scripts/validate_stage7_backend_mapping.py**: Python validator that checks 0008 sections, docs, and benchmark for required patterns
- Validator integrated into \scripts/validate_patch_stack.sh\
Stage 6 — Placement and Lifetime Metadata
The 0007 patch adds model/session/lifetime placement metadata that the benchmark drives and the backend mapping layer consumes:
- \�num kairo_lifetime_class\ (SHORT, SESSION, MODEL, PERSISTENT)
- \struct kairo_placement_hint\ with model_id, session_id, cache_pool_id, placement_group, recompute_ok
- Benchmark --lifetime, --recompute-ok, --cache-pool-id, --placement-group, --cache-pools, --placement-groups\
- 9 scaffold placement counters in sysfs
Stage 6.5 — Experiment Harness Hardening
- \scripts/run_stage6_placement_experiment.sh: hardened harness with <file-path> \ interface and structured
esults/stage6//\ output - \scripts/parse_stage6_placement_summary.py: parser with counter delta columns, --csv\ and --pretty\ output
- \scripts/collect_kairo_counters.sh: unified counter coverage for both naming sets
Foundation Stack Repairs
Multiple rounds of foundation patch repair and validation hardening:
- Foundation/0004 hunk headers regenerated for post-0003 file state
- Corrupt context lines (tab-prefixed instead of space+tab) repaired
- Shellcheck issues fixed: SC2034 (unused local variable shadowing), SC2155 (declare-and-assign masking return codes)
- Foundation invariant checks and validation script hardening
- Patch 0008 had incorrect
r_streams\ check (--enable\ → \