Final review report · NVIDIA/hyperflare-inference #625

Raw Markdown for agents: https://autobot.eidonix.com/p/144e852d-94ad-49ff-9f53-045da097acc2.md

Recommendation: Changes Requested

The core allocator rewrite in eos/src/unix.rs and startup timing/progress plumbing in selene and helios are technically sound, well-reasoned, and directly address the THP direct-compaction root cause reported in #616 (including preserving a single merged VMA via pre-anchored anon_vma and whole-range final madvise). However, CI failed on head 9639e57 (cause not retrievable from repo metadata), the Charter #210 served flare run verification gap is neither run nor recorded in docs/TODO.txt (AGENTS.md:57-59), and a couple of targeted NUMA/multi-tenant guard improvements plus a clean deduplication in selene/src/offload.rs should be resolved before merge.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Failing CI on head 9639e57: CI reported a failure on the current head across the applicable workflows (.github/workflows/native-serving.yml (not opened), .github/workflows/helios-lifecycle.yml (not opened)), and the failing job log is not available in the repository metadata. Fix: Inspect the failing CI leg, fix any regression (or re-run if it is the pre-existing selene-manager a_freed_window_credit_is_granted_without_waiting_for_the_clock timing flake), and verify all required checks pass on head before merge.

Should Fix

  1. Unrun served-workload A/B and missing docs/TODO.txt entry (AGENTS.md:57-59, docs/design-review.md:109-115): The 128.56 s → 30.99 s and 68.46 s measurements are from a standalone eos::map_host + cuMemHostRegister_v2 harness; no flare run A/B against main was run, and the PR adds no docs/TODO.txt entry for the unrun flare run, live RDMA ibv_reg_mr, or 16 KiB/64 KiB kernel checks. Fix: Either run flare run <exported-core> --prefix-cache-memory <size> --prefix-cache-disk <dir> against main under THP enabled=madvise, defrag=madvise and include the Prepare host prefix cache timings, or record the unrun end-to-end flare run, live RDMA, and non-4 KiB kernel checks in docs/TODO.txt per AGENTS.md:57-59.
  2. Respect process NUMA memory restrictions when summing /proc/buddyinfo (eos/src/unix.rs:272-328): parse_buddyinfo_free_hugepages sums Normal/Movable free huge pages across every NUMA node in /proc/buddyinfo. While summing across nodes is appropriate under unconstrained MPOL_DEFAULT (where Linux ≥ 5.2 allocates MADV_HUGEPAGE across nodes in the fast path before compacting, so taking min across nodes would wrongly disable THP on asymmetric-occupancy hosts), processes bound to a subset of nodes via cpuset.mems or numactl --membind see unreachable remote nodes counted in preferred_total. (The latency/compact_stall guard still bounds any stall to one chunk, so #616's 15-minute stall does not recur, but the upfront buddyinfo guard is bypassed.) Fix: Parse the Node N, id on each line and, when /proc/self/status exposes Mems_allowed_list, sum only allowed NUMA nodes (falling back to all nodes if unreadable), plus add a unit test for a filtered two-node fixture.
  3. Avoid single-strike false fallback on system-wide /proc/vmstat compact_stall (eos/src/unix.rs:572-595): Because compact_stall is host-wide, a single slow chunk (elapsed in (stall_floor, hard_ceiling], e.g., from brief scheduler contention during parallel multi-rank startup) coinciding with a +1 compact_stall from an unrelated process triggers fell_back = true; break; and populates the entire remainder of a 100+ GiB slab with base pages. Fix: Require 2 consecutive ChunkStallCheck::CheckCompactStall hits with advancing compact_stall before setting fell_back (keeping ChunkStallCheck::Stalled above hard_ceiling as an immediate 1-chunk breaker so real compaction stalls still exit in one chunk).

Subtract / Simplify

  1. Deduplicate the 9-line populate/register sequence (selene/src/offload.rs:702-735): Lines 713-723 (None arm of try_sized_by_rank) and 725-735 (else arm) are byte-for-byte identical. Attempt try_sized_by_rank into let split: Option<SlabPool> first, then share one match split { Some(pool) => pool, None => { ... } } block (~−16 lines and a single source of truth for step labels and timer resets).
  2. Consider dropping the pass-through helios::offload::prepare_with_inputs_budget wrapper (helios/src/offload/mod.rs:82-99): Its only caller in the workspace is helios::offload::prepare_with_inputs (:79), since NativeModel::prepare_offload (helios/src/runtime_core/model.rs:966) moved to prepare_with_inputs_budget_with_progress. If preserving the pub fn signature for external Rust consumers / parity with selene::offload is intentional, keep it; otherwise point prepare_with_inputs straight to prepare_with_inputs_budget_with_progress(..., None, |_| {}) and delete lines 82-99.

Nits

Dropped on verification