#1 [high] Change: what PR #713 does, files and size
PR #713 (jcartu, open 2026-12-03, head 4efd9fd, base main, branch point cc0a49d). Refs #630. No labels, no reviews, no CI checks.
Real changed files (pr_files): flare-cli/src/{config.rs +103, core_cache.rs +3/−1, distribution.rs +240/−3, main.rs +31/−28, orbit/agent.rs +3/−1, orbit/controller.rs +91/−3}, helios/src/{core/cache.rs +20/−9, lib.rs +4/−1, runtime_core/driver.rs +2, runtime_core/memory.rs +266, runtime_core/mod.rs +16/−2}.
Three independent changes:
flare-cli/src/distribution.rs::serve_sourcenow streams peer-served core ranges with O_DIRECT viadirect_reopen/FileReadAt/allocate_aligned(re-exported from helios::lib.rs, originally eos/src/lib.rs:24,48,61 and eos/src/unix.rs:61), plusrelease_page_cache_rangeafter serving. Falls back tocopy_ranges_buffered(RangeReader + release_page_cache_range) when O_DIRECT is unavailable or returns EINVAL mid-stream. Four newrelease_page_cachecall sites: orbit/controller.rs uploadputloop, core_cache.rs AlreadyExists digest re-verify, orbit/agent.rsget, helios/src/core/cache.rs (write_stream post-sync_all, verify_file, hash_file, non-Windows copy_file).flare-cli/src/config.rsmakesorbit runinherit[memory] reserveasMemoryLimit::Reservewhen--memory-limitis unset;main.rstracksmemory_limit_from_config;orbit/controller.rs::merge_serving_optionsrefuses to overwrite a persistent group's saved--memory-limitwith the config-inherited one while letting an explicit CLI flag override.- helios meminfo diagnostics: new
LinuxMemInfo{free,available,cached}parser for /proc/meminfo in runtime_core/memory.rs, appended to thePlan cachesummary on integrated GPUs, stderr warning when memory-limited and MemAvailable−MemFree > 10 GiB (PAGE_CACHE_WARN_THRESHOLD), andenrich_integrated_ctx_oomattaching meminfo + drop_caches hint (>4 GiB gap) to CUDA_ERROR_OUT_OF_MEMORY on cuCtxCreate_v2 / cuDevicePrimaryCtxRetain. New const CUDA_ERROR_OUT_OF_MEMORY=2 in driver.rs.
#2 [high] Change: PR diff view is polluted by merged sibling PRs (stale base)
The pr_diff tool output for #713 does NOT match pr_files. The diff includes whole-file changes to flare/src/controller.rs (gpu/active_gpu fields, desktop_cuda_ordinal), flare-winui/bridge/src/lib.rs, helios/src/cache.rs (only_child tracking, eviction priority), helios/src/cache/lifecycle_tests.rs, helios/src/execution/roce.rs (gid_indices per-HCA), selene/src/lib.rs, docs/*.md, AGENTS.md, .github/workflows/native-serving.yml, docs/TODO.txt — none of which appear in this PR's file list.
Cause: the branch point reported is cc0a49d and the repository's commit graph is partly unreadable (search_history fails: "Could not read c513e46a… fatal: Failed to traverse parents of commit ef38cb9…"), so the merge-base computation is stale and the diff is taken against a much older commit than main's current tip.
Consequence for anyone reading: the ~1.29M-character "diff" overstates the change. The authoritative scope is the 11 files in pr_files. Do not attribute the AGENTS.md/CUDA_HOME rewrite (that is #690, merged 2026-12-03), the WinUI GPU-by-UUID work (that is #702, merged 2026-12-03), the RoCE per-device GID change, or the prefix-cache only_child refactor to #713.
#3 [high] Why: #630's three asks vs what #713 answers
Issue #630 (pfn, opened 2026-11-30, updated 2026-12-02, open, labels area:memory/bug/performance/priority:P2/triage:investigate). 2× DGX Spark GB10 (121.6 GiB unified), flare 0.5.0, GLM-5.3-Flash-FP4 TP2, [memory] reserve = "4G".
Symptom: on identical cores/flags, orbit run plans 13.0–14.4 GiB cache budget / ~1.96–2.19M KV tokens (limited by memory) vs 20.5–22.2 GiB / 3.15–3.43M for a manual flare run after cache eviction — −37.8%, and 1,961,984 tokens is below the reporter's 2,000,000 operating floor. MemAvailable reads ~115–116 GiB in every state; only MemFree predicts the outcome. Separately, cuCtxCreate_v2 failed (2, CUDA_ERROR_OUT_OF_MEMORY) during Initialize GPU with MemFree 0.8–1.5 GiB while MemAvailable ≈116 GiB.
Three asks from #630:
- Size the KV plan (and CUDA context budget) from MemFree, or flush reclaimable cache before planning.
- Print MemFree/MemAvailable/Cached alongside
Allocate cache, and warn when they diverge by >10 GiB. - Print MemFree/MemAvailable/Cached on the cuCtxCreate failure path.
How #713 matches: ask 2 → append_integrated_meminfo in helios/src/runtime_core/memory.rs appends the triple to the Plan cache summary and emits a stderr warning when limited_by_memory && MemAvailable−MemFree > 10 GiB (PAGE_CACHE_WARN_THRESHOLD = 10<<30). Ask 3 → enrich_integrated_ctx_oom appends the triple to CudaError.description plus a drop_caches hint when the gap > 4 GiB (CTX_OOM_DROP_CACHES_THRESHOLD). Ask 1 is only partially served: the PR adds more page-cache release sites and switches peer serving to O_DIRECT, but it does NOT change sizing to read MemFree — shared_available still goes through flare_selene::offload::available_memory (helios/src/runtime_core/memory.rs:32 area). Description says "live GB10 impact remains unmeasured".
Third #630 comment (2026-12-02, on v0.5.1/1fbcc3c9/#667) records controller MemFree 1.0 / MemAvailable 11.2 / Cached 10.6 GiB at idle, ~9 GiB of distribution-related page cache still resident, and that none of #667's release calls visibly cleared it by plan time — exactly the gap #713's four extra release sites + O_DIRECT target.
#4 [high] Related work: #646 and #667 are the page-cache campaign #713 continues; #323 was closed on the premise #713 fixes
Lineage of #630 mitigation work (all by different authors, all merged):
- #646 (lukealonso, merged) "Unify Orbit rank cache, fix GB10 page-cache KV sizing…" — first KV-sizing attempt; #630 comment on 2026-12-01 03:34 says "Still open on main e85019b9 — #646's GB10 KV-sizing change did not cover this path."
- #667 (lukealonso, merged 2026-12-01, 25 files +1588/−352) — added
release_page_cache/release_page_cache_rangeto eos and call sites insha256_file,serve_sourceranges,Sourceteardown,store_parallel/store_partial,agent::fetch,protection.rshashing, post-load_payload. Its own body says GB10 "not yet re-measured on GB10 hardware". #713 directly continues this: same issue, same functions, four more call sites, and adds O_DIRECT to the exactserve_sourcepath #667 instrumented. Overlap is textual in flare-cli/src/{distribution,core_cache}.rs, orbit/agent.rs, helios/src/lib.rs, helios/src/core/cache.rs. - #589 (lukealonso, merged) and c9935887 (v0.4.1) — integrated-memory budgeting (
integrated_offload_host_budget). - #707 (lukealonso, merged) — RoCE per-HCA GIDs + CI parity; the
.github/workflows/native-serving.yml"Test native RoCE transport" step andhelios/src/execution/roce.rsgid_indices changes visible in #713's diff belong to #707, not #713. - #302/#73 family: #630 names #73 (open) as the export-time cousin (vm.min_free_kbytes hides ~6.6 GB from a headroom check).
- #323 (javieratomic, closed 2026-11-30 as superseded by c9935887 and #589) proposed
--system-headroom; closer (yatesdr) wrote that the tested 2G configuration "is now expressed directly with--memory-limit=-4Gor[memory] reserve = "4G"". See separately: that advice did not hold forflare orbit runbefore #713. - #93 (open, "Warm multi-host start re-hashes each peer's cached rank…") is the counter-pressure: #667's review flagged that unconditional Linux page-cache eviction trades warm host-RAM reuse (#93) for GB10 headroom (#630). #713 extends that trade to O_DIRECT peer serving, which the description discloses as dropping kernel readahead.
#5 [high] Project fit: charter (DGX Spark, Orbit, evidence) and the docs #713 makes stale without touching
Charter (read_charter) facts bearing on #713:
- Charter line 3 names DGX Spark explicitly as a target: "squeeze the most out of workstation and compact hardware—specifically SM120/SM121 workstations and DGX Spark". #630 is a DGX Spark (GB10) report, so the problem is in-charter.
- Charter line 22: "Support single-host and cross-node serving, with Orbit handling placement and supervising serving ranks." #713 touches Orbit peer serving (
serve_source). - Charter line 42: "Supported matrix & compatibility: Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target named in the docs." #713 changes the I/O path of every Orbit multi-host launch; the author states no live GB10 run — the targeted hardware/channel is unverified.
- Charter "Bring real evidence": "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210). Bug fixes need to address the root cause (#397)." #713's evidence is test-suite counts only; GB10 impact explicitly unmeasured; #630 ask 1 (size from MemFree) is not addressed — mitigation is eviction around it.
- Charter "Stay focused… not interested in random switches": no new user-facing flag; small surface.
- Charter "PR descriptions: Expect four parts: why / what changed / claimed result / evidence". #713 has Summary / Changes / Verification / Disclosures-Limitations: no "why" narrative and no claimed quantitative result, though the limitation is honestly labelled.
Docs on main that #713 makes true or leaves stale (no docs files in pr_files — zero documentation changes):
- docs/cli-design.md:1469 "| Serving memory budget | Runtime
--memory-limit, then configured[memory] reserve, then the core reserve |" already claims the config reserve applies; fororbit runthat was untrue before #713. The PR never says it is fixing a doc/behaviour mismatch. - docs/cli-design.md:1436-1440 "memory.reserve exists for one case… Native serving uses an explicit host configuration value in preference to that recorded reserve."
- docs/cli-design.md:36-38, 880-883 on explicit limit/reserve replacing the default reserve.
- docs/cli-design.md:177-178 "
flare orbit runtakes the serving flags offlare runand applies them to every rank" — the parity justification; not cited in the PR. - Persistent-group precedence (config-inherited reserve must not clobber a saved group's --memory-limit, explicit CLI flag does) is NOT documented anywhere I could find (docs/orbit.md only mentions --persistent in the command table, line 32). New user-visible precedence rule shipped undocumented.
- Change 3 adds operator-facing output (extra fields on the
Plan cacheline, a stderr warning, a drop_caches hint inside an error) with no doc update; docs/cli-design.md:1436-1470 is the natural home.
design-review token: the description says .githooks/commit-msg: passed (design-review=2e5b), but docs/design-review.md:298 requires a Design-Signed-Off-By: <reviewer identity> line; the PR names no sign-off identity.