Skip to content

Kairo v0.1.0

Choose a tag to compare

@manishklach manishklach released this 21 Jun 16:27

Kairo v0.1.0

Kairo v0.1.0 marks the first public snapshot of the project as a full internal RFC/POC for AI KV-cache-aware Linux block I/O on generic NVMe SSDs.

This release moves the repo beyond a single scheduler idea and into a broader multi-patch kernel architecture backed by a measurable benchmark and validation harness. The focus remains local, benchmark-driven validation of whether Linux block-layer changes can reduce decode-read tail latency under mixed AI inference-like storage pressure.

Positioning

  • internal RFC/POC
  • experimental kernel patch series
  • benchmark-driven prototype
  • generic NVMe SSD focus
  • AI inference-like KV-cache workload modeling
  • not intended for LKML submission at this stage

Highlights

Full Kairo patch series scaffold

The kernel/patches/ directory now carries a nine-patch Kairo RFC/POC series:

  • 0001-rfc-kairo-mq-deadline-decode-priority.patch
  • 0002-rfc-kairo-request-classification.patch
  • 0003-rfc-kairo-io-uring-hint-plumbing.patch
  • 0004-rfc-kairo-large-block-coalescing.patch
  • 0005-rfc-kairo-prefetch-deadline-hints.patch
  • 0006-rfc-kairo-ephemeral-cache-semantics.patch
  • 0007-rfc-kairo-placement-lifetime-hints.patch
  • 0008-rfc-kairo-nvme-zns-fdp-mapping.patch
  • 0009-rfc-kairo-sysfs-debug-counters.patch

The series now spans:

  • mq-deadline decode-read prioritization
  • shared request classification helpers
  • experimental io_uring / RWF_KAIRO_* hint plumbing
  • large-block merge bias for KV-style reads
  • prefetch-specific urgency modeling
  • ephemeral and recomputable cache semantics
  • model/session/lifetime placement hints
  • generic NVMe Streams/FDP/ZNS mapping hooks
  • sysfs and debug observability counters

Measurable validation path

Kairo now includes a stronger local validation harness for Linux 6.8.x:

  • kernel/integration/linux-6.8/ patch apply and block-build helpers
  • scripts/validate_kairo_runtime.sh for runtime counter validation
  • scripts/run_ab_experiment.sh for baseline vs Kairo comparison
  • scripts/run_multisession_experiment.sh for session/model fan-out pressure
  • scripts/collect_kairo_counters.sh and expanded block-stat collection

The main proof points remain:

  • decode_avg_us
  • decode_p50_us
  • decode_p95_us
  • decode_p99_us
  • write_MBps
  • Kairo dispatch-counter deltas showing whether the Kairo path was actually hit

Benchmark upgrade

bench/kairo_bench.c now behaves more like an AI KV-cache storage harness than a generic mixed-I/O toy.

New benchmark modes:

  • decode-only
  • mixed
  • prefetch-pressure
  • eviction-pressure
  • multisession

New workload controls include:

  • --sessions
  • --models
  • --evict-threads
  • --prefill-region-pct
  • --decode-region-pct

The benchmark summary now reports workload shape and ioprio setup status, including:

  • mode
  • sessions
  • models
  • evict_threads
  • ioprio_decode_ok
  • ioprio_decode_fail
  • ioprio_prefetch_ok
  • ioprio_prefetch_fail
  • ioprio_write_ok
  • ioprio_write_fail

Documentation added

This release adds architecture-facing project docs that explain the broader Kairo direction:

  • docs/patch_series.md
  • docs/full_architecture_status.md
  • docs/roadmap.md
  • docs/tested_kernel_matrix.md

These documents map the Kairo vision to concrete patch areas and separate the implemented proof point from the more aggressive RFC/POC scaffolds.

Current state

What is relatively strong today:

  • repo structure and architecture direction
  • benchmark and experiment harness
  • 0001 decode-priority path as the current kernel proof point
  • validation and observability workflow

What is still intentionally RFC/POC-level:

  • deeper request metadata plumbing across the stack
  • prefetch deadline policy tuning
  • ephemeral semantics behavior in real kernels
  • generic NVMe backend mapping hooks
  • full runtime validation of later patches beyond 0001

Suggested next steps

  • validate 0002 to 0005 against a concrete Linux 6.8.x source tree
  • boot a patched kernel and confirm expanded Kairo sysfs counters are visible
  • run scripts/run_ab_experiment.sh and scripts/run_multisession_experiment.sh on a generic NVMe SSD
  • populate docs/tested_kernel_matrix.md with boot/runtime results
  • use the new counters to confirm whether decode, prefetch, merge, and hinted-request paths are actually active

Key commits in this release

  • bffefe3 poc: validate Kairo mq-deadline patch against Linux 6.8
  • cf011ab supernova: add Kairo validation and A/B experiment harness
  • c2e14cd supernova: expand Kairo into full KV-cache-aware kernel patch series