PR #576 — Adjudication brief: "Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies"
Head 4b41ddc, 7 files, +226/−1. Six upstream lenses (~30 raised items) are deduplicated and pre-filtered to 13 survivors: 2 Candidate Blockers, 4 Candidate Should Fix, 3 Candidate Subtract/Simplify (one of which is a "do not touch" clearing), 4 Candidate Nits.
Context that changes how downstream should weigh everything: the PR's discussion contains exactly one entry — a flare-autobot case-file notice (2026-11-28 19:45, "A case file has been opened for 576"). Zero human reviews, zero inline comments, zero CI checks on head. So nothing has been resolved by a later commit, and no lens claim is contradicted by a maintainer statement; every surviving item is live at head. Equally, there is no CI-red noise to drop and no maintainer authorization on record for the change (only local index #577/#575/#574 — same author, different subjects — plus #280 WFET parking and #556 DispatchRing; none covers CPU affinity, and AGENTS.md:165-169/:201-206 ask for an explicit maintainer request). Treat that as context for B1, not as a separate finding.
Key findings
- (Blocker, B1) The PR installs a default-on, unconfigurable host-scheduling policy with a magic 0.9 constant into the shared
eoscrate, reached from every Linux serving build at five thread entries. There is no parameter, return value, flag, config field, or env var — and no way to turn it off. This is the sharpest judgment call in the brief: is a silent heuristic acceptable policy at all, or must it be an explicit setting (or a documented cpuset recommendation)? - (Blocker, B2) The vendored RoCE proxy is no longer identical to its pin, and the same policy is now implemented twice (Rust + C, kept in sync by hand), while
roce_proxy.c:6-8,NOTICE:18-19anddocs/roce-ring.md:360-364still assert identity. Four lenses converged here (Correctness "should fix", Prose "blocking", Conventions 1, Subtractive/Simplicity 1). Per the subtraction rule, the surviving framing of the fix is Subtractive's: delete the C copy. - (Should fix, S1) Evidence never compares head to
mainand names no reproduction path or A/B arm definition — the charter's "benchmarks showing an actual speedup overmain" test is not met even though the measurement work is otherwise substantial and honestly reported. - (Should fix, S2) Every failure path is a silent no-op and the only observable step (
sched_setaffinity) is discarded, so the PR's own headline placement claim is unfalsifiable in the field —let _ =/(void)in both languages. - (Should fix, S3) The only code that touches the system (
sched_getaffinity+ sysfs +sched_setaffinity) has no test at all, and neither does the whole C helper; the three new tests cover only the pure selector. - (Should fix, S4) A public API (
serve_rank) now permanently narrows the calling thread's affinity as its first statement, before validation, undocumented — and the Python caller reuses that thread afterwards. - (Subtractive) ~107 of +226 added lines (~47%) are removable without losing either headline placement result: the 66-line C copy, the three-tier midpoint fallback (+test), and the two non-serving call sites (
flare-cuda,flare-execution). - Two corrections no upstream lens made, both of which change the adjudication: (a) the "x86_64 is 100% no-op" promise rests only on the kernel not exposing
cpu_capacity— there is no arch guard anywhere, so any x86 host exposing it gets narrowed by the same 90% rule; (b) the "missingthreaded.rscall site" objection is largely void — productionThreadedExecutors are constructed inside already-narrowed parents, so deleting the two non-serving call sites costs no coverage.
Candidate Blockers
B1 — Default-on, unconfigurable policy with a magic 90% constant living in the shared eos crate
Source: Architecture B1 (unique). Strengthened with the no-arch-guard fact and the prefix-cache-offload precedent.
What the code actually does. The policy is unconditional and the two thresholds are bare literals with no configuration surface:
eos/src/unix.rs:190-209 — the whole policy; 10/9 and the midpoint 2/sum are the only definition of it anywhere:
let mut selected: Vec<usize> = allowed_with_capacity
.iter()
.filter(|&&(_, cap)| u64::from(cap) * 10 >= u64::from(max_cap) * 9)
.map(|&(cpu, _)| cpu)
.collect();
if selected.len() < 2 {
// Avoid collapsing multiple busy threads onto a single prime core on
// three-tier topologies: fall back to all cores above the capacity midpoint.
let sum = u64::from(min_cap) + u64::from(max_cap);
selected = allowed_with_capacity
.iter()
.filter(|&&(_, cap)| u64::from(cap) * 2 > sum)
.map(|&(cpu, _)| cpu)
.collect();
}
if selected.len() >= 2 && selected.len() < allowed_with_capacity.len() {
Some(selected)
} else {
None
}
eos/src/unix.rs:212-216 — the entry point takes no arguments and has no opt-in:
/// Restrict the calling thread to high-capacity CPUs within its current
/// affinity mask on asymmetric Linux systems. No-op on homogeneous CPUs,
/// restricted cpusets that already cover one tier, or non-Linux targets.
#[cfg(target_os = "linux")]
pub fn prefer_high_capacity_cpus() {
Why it is a blocker (rules cited).
- Charter, How We Work: "Be explicit and pin everything. No magic defaults" — 90% of max plus a 50% midpoint fallback are exactly that, and they decide which cores a latency-critical serving thread may use on every ARM Linux launch.
AGENTS.md:453-457: "A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag." This setting has none. The PR's own justification ("without environment variables, systemd overrides") inverts the rule — the operator's only recourse is an externaltaskset/systemd cpuset, i.e. the PR ships a workaround for a decision the code made silently.docs/design-review.md:89-92(principle 10, Use explicit configuration): "explicit user values win over defaults." There is no user value at all.AGENTS.md:188-193: "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement" — the midpoint fallback exists for a three-tier prime-core SoC that appears nowhere but a unit test (eos/src/unix.rs:298-314; the description's only hardware, GB10, is two-tier).
The no-arch-guard fact (not raised by any lens). The description's "on x86_64 Linux … cpu_capacity is not exposed by the kernel, so this executes the no-op path" is true but rests entirely on the sysfs read failing — eos/src/unix.rs:228-230. There is no #[cfg(target_arch)], no compile-time or runtime arch check anywhere in the function. Any x86_64 host that exposes cpu_capacity (hand-built kernel, container with mounted sysfs) would have its threads narrowed to whatever sits within 90% of its max capacity. This makes the blast radius larger than the description implies and strengthens B1 rather than standing as its own item.
Supporting precedent, not a separate finding. docs/prefix-cache-offload.md:863-867 is the repository's only prior statement on thread affinity and sets a stricter bar than this PR meets for a blanket default: offload threads stay on SCHED_BATCH and "Adding CPU affinity requires a serving-latency measurement that shows a benefit." The PR does bring measurements for the threads it pins — the gap is that they are default-on for the whole runtime and the vendored proxy, not scoped and evidenced per thread (see S1).
Also observe: the same ~60-line heuristic exists twice, in Rust (eos/src/unix.rs:172-210) and C (helios/native/roce_proxy.c:1510-1569), with two threshold expressions, two CPU_SETSIZE loops and two copies of the fallback, kept in sync by hand across two build systems (the identity/sync half is adjudicated in B2).
Adjudication axis / fix. Either (a) make it an explicit setting in one of the three sanctioned homes — a typed config field or a CLI flag on flare run/Helios — stating the CPU set the operator wants (an explicit set also removes the magic constant and the midpoint fallback), or (b) drop the code and document the taskset/systemd-cpuset recommendation in the runtime-core or multi-host design doc. If a heuristic survives, the threshold and fallback must be justified by named hardware and stated in the docs.
B2 — The vendored RoCE proxy is no longer identical to its pin, and the policy now exists twice
Source: Correctness "should fix", Prose "blocking B1", Conventions 1+2, Subtractive 1, Simplicity 1, Correctness nit 1 — six lens items collapsed into one.
The invariant the repo states today, all three left untouched by the PR:
helios/native/roce_proxy.c:6-8 (the file's own preamble):
// Vendored from FlashInfer's pinned preparation dependency
// (flashinfer/experimental/b12x/comm/roce/_roce_proxy.c (not opened), proxy ABI 14).
// Keep the source below identical so preparation and serving share the transport ABI.
NOTICE:16-19:
helios/native/roce_proxy.c was contributed by its original author from:
https://github.com/local-inference-lab/flashinfer/blob/f5f5341d711f8210ce91af5731a0841570f70e53/flashinfer/experimental/b12x/comm/roce/_roce_proxy.c
The proxy is compiled into Linux aarch64 builds. Its implementation is unchanged
from that revision; Flare adds a license and provenance preamble.
docs/roce-ring.md:360-364:
serving proxy in `helios/native/roce_proxy.c`; preparation uses the pinned
FlashInfer dependency. When changing the protocol, keep the vendored source
identical to the dependency after its provenance header and verify their ABI
and collective-region layouts together.
What the PR adds (71 lines of Flare-local C, no marker):
helios/native/roce_proxy.c:1505-1510 (opening the block):
#ifdef __linux__
// Restrict the proxy polling thread to high-capacity CPUs within its current
// affinity mask on asymmetric Linux systems (such as ARM big.LITTLE). No-op
// when sysfs cpu_capacity is absent, homogeneous, already restricted to one
// tier, or would collapse below two CPUs.
static void pin_high_capacity_cpus(void) {
helios/native/roce_proxy.c:1572-1577 (the two calls in proxy_main):
static void* proxy_main(void* arg) {
roce_ctx_t* c = (roce_ctx_t*)arg;
#ifdef __linux__
(void)pthread_setname_np(pthread_self(), "flare-roce");
pin_high_capacity_cpus();
#endif
Why it matters beyond bookkeeping. Preparation (pinned FlashInfer) and serving (this vendored copy) must agree on proxy behaviour and progress-barrier semantics — that is the failure mode the rule was written for after earlier ABI-drift incidents (#271, #251, #215, #279). The description says the paired upstream PR (local-inference-lab/flashinfer#156) is independent and "either PR can merge in any order" — precisely the case the identity rule protects against: if this lands first, the vendored file is silently ahead of the pin, and the next re-vendor from f5f5341d drops the helper, the call and the thread name with no test failing (nothing in the tree compares the vendored file to the dependency). AGENTS.md:165-167 makes inaccurate documentation a defect in its own right, and the description's compatibility paragraph ("proxy ABI remains 14") answers a different question than the vendoring rule asks. Also note docs/TODO.txt:80-86 already tracks a pre-existing preparation/serving parity skew — do not bill that to this PR.
Duplication (element-for-element, verified side by side):
| Policy element | C (roce_proxy.c) |
Rust (eos/src/unix.rs) |
|---|---|---|
| read own mask | :1513 |
:218 |
| per-CPU sysfs read | :1526 |
:227 |
| abort on unreadable/zero | :1528-1536 |
:228-233 |
<2 or min==max → return |
:1543 |
:173-187 |
| 90% band | :1550 (uint64_t)caps[i] * 10 >= (uint64_t)max_cap * 9 |
:192 u64::from(cap) * 10 >= u64::from(max_cap) * 9 |
| midpoint retry | :1555-1565 cap*2 > sum |
:195-204 |
gate 2 <= selected < count |
:1566 |
:205 |
Only the Rust copy is tested; the C copy compiles only under --features roce (helios/build.rs (not opened)).
Surviving fix (prefer subtraction). The proxy thread need not pin itself: roce_start creates it with pthread_create (helios/native/roce_proxy.c:1674), its sole caller is RoceTransport::connect, and a new pthread inherits the creator's mask. So delete :1505-1570 and the call at :1576, keep the two-line pthread_setname_np, and add one line above roce_start:
helios/src/execution/roce.rs:295:
if unsafe { roce_start(self.context) } != 0 {
Net −66 C lines, +1 Rust line, one tested implementation, vendored file unchanged.
⚠ Caveat the adjudicator must weigh (no lens raised it): connect() runs on the process main thread (flare-cli/src/main.rs:613 rank_zero, :549 peer), so narrowing there also narrows every thread spawned later in that process (e.g. flare-dashboard, helios/src/server/runtime.rs:1011 ImagePreparation) — a wider blast radius than the C helper it replaces. The safe variant is to spawn a short-lived transport-opener thread that narrows itself and then calls roce_start; still zero C changes.
Weaker alternative fix (Conventions/Prose): mark the block as a dated Flare addition and update roce_proxy.c:6-8, NOTICE:18-19, docs/roce-ring.md:360-364 and the description's compatibility paragraph, stating the removal condition. This leaves the duplicate policy in place and must say why the identity rule is being broken.
Candidate Should Fix
S1 — Evidence never compares head to main, and gives no reproduction path or arm definition
Source: Architecture B2 + Prose S1 (deduped; downgraded from Architecture's "blocking" — it is a method/description gap, not a code defect).
What the description reports (all verified in the PR body): placement 48/48 vs 4/4; batch=1,width=8 graph-time CV 4.82%→0.72%; batch=1,width=1 1.50%→1.07%; C8 64k A/B 123.66→144.88 tok/s; cold prefill +2.6%…+17.3%; nsys RoceOneshotLaunch 2.77→1.91 ms; verify p90 wake gap 1,880.3→30.9 µs.
Why that is insufficient.
- Every number is pinned-vs-unpinned placement within the change on the same tree, not a
flare runof the same exported core onmainvs this head. Charter: "Bring real evidence. Performance PRs need benchmarks showing an actual speedup overmainon a served workload (#210)";docs/design-review.md:106-114(principle 12) requires equivalent baselines and disclosure of unrun checks. - The A/B arms are undefined: "Cortex-X925 placement … vs Cortex-A725" does not say whether the A725 arm was the same binary without the call, or the same binary externally confined with
tasksetto0-4,10-14. Those support different conclusions (one measures this patch, the other measures core capability).AGENTS.md:95-102forbids attributing a combined result to one PR. - Placement counts mix denominators: 48 thread observations (4 ranks × 6 launches) against 4 launch observations.
- No command for any measurement —
scripts/benchmark_roce.py(not opened),benchmark_prefill.py(not opened),benchmark_scheduler.py(not opened) etc. are never referenced, and thensys --cuda-graph-trace=nodeinvocation is not given.AGENTS.md:103-112: "Reproduction commands must identify the required inputs and configuration directly or through a precise reference; placeholder arguments alone do not explain a measurement." - Unmeasured cost: threads previously free across 20 CPUs are now confined to 10, and the proxy still naps on the narrowed set:
helios/native/roce_proxy.c:1584-1586:
uint64_t idle = 0;
const struct timespec nap = {0, 20000};
while (atomic_load_explicit(&c->running, memory_order_relaxed)) {
- Also unstated: launches per arm and their spread for the headline CV figures; whether the CV/tok-s arms used the identical exported core (only the cold-prefill ladder says "same core, no re-export"); and that the served recipe ("Inkling 2 Small NVFP4") lives in
local-inference-lab/hyperflare-recipes, not this repo.
Fix. One short "How the measurements were produced" block: the Helios/Orbit invocation, the benchmark script + arguments per claim, the nsys command, one sentence per arm saying what differed (binary, env, or external mask), and the placement-observation command (ps -L -o comm,psr filtering the new flare-roce name) with both counts expressed per thread. Or: if the intent is only to demonstrate the placement effect, then it should not be a default — see B1.
S2 — Silent failure paths make the claimed "strict no-op" unverifiable and suppress errors
Source: Architecture S1 + Prose N2 + Conventions "result dropped" nit. Merged.
AGENTS.md:182-186: "Do not remove validation, suppress errors, silently substitute execution paths…"; charter: "don't just swallow, skip, or retry an unexplained error (#397)."
eos/src/unix.rs:225-236 — one unreadable file aborts the whole computation, including the CPUs already read successfully, with no diagnostic:
for cpu in 0..max_cpus {
if unsafe { libc::CPU_ISSET(cpu, &allowed) } {
let path = format!("/sys/devices/system/cpu/cpu{cpu}/cpu_capacity");
let Ok(text) = std::fs::read_to_string(&path) else {
return;
};
let Ok(cap) = text.trim().parse::<u32>() else {
return;
};
allowed_with_capacity.push((cpu, cap));
}
}
eos/src/unix.rs:244 — the only observable step, discarded:
let _ = unsafe { libc::sched_setaffinity(0, std::mem::size_of::<libc::cpu_set_t>(), &next) };
Same in C — roce_proxy.c:1527-1536 (FILE* f = fopen(path, "r"); if (f == NULL) { return; } … if (matched != 1 || val == 0 || val > UINT32_MAX) { return; }) and roce_proxy.c:1566-1568:
if (selected >= 2 && selected < count) {
(void)sched_setaffinity(0, sizeof(next), &next);
}
Consequence. A serving log cannot distinguish "policy applied" from "sysfs missing" from "seccomp refused sched_setaffinity" — so the PR's 48/48 placement claim is unfalsifiable in the field, and B2/S1's claims become untestable by anyone else. Sibling eos helpers do report their outcome (free_space → io::Result<u64>, raise_open_file_limit → Option<u64>).
Fix. Return a status/Result (or the selected set) so callers and tests can observe whether the mask was applied, or emit one startup diagnostic line when the policy is skipped (the pattern used for WFET parking, #280). Do not merge with let _ =; if silence is deliberate, document it as best-effort in the doc comment of both implementations.
S3 — The only code that touches the system is untested, and the untested arm is the latency-critical one
Source: Architecture S3 + Correctness nit 2 + Conventions open question.
AGENTS.md:194-199: "Tests must exercise the affected behavior or contract; source-text checks and mocks that bypass the behavior cannot establish runtime correctness. … Identify missing hardware, inputs, and unrun checks explicitly."
All three new tests exercise the pure selector only. eos/src/unix.rs:254-255:
#[test]
fn select_high_capacity_cpus_splits_asymmetric_tiers() {
(then the homogeneous/single-tier/zero-capacity no-op test at :277-296, the three-tier test at :298-314.)
Nothing covers eos/src/unix.rs:216-245 — sched_getaffinity, the sysfs read, sched_setaffinity. Nothing anywhere covers helios/native/roce_proxy.c:1510-1569, the helper the PR credits for its headline flare-roce result; it is compiled only under --features roce and was exercised solely by the author's 4×Spark run and a soak. The Windows stub was never compiled — disclosed in the description, to the author's credit; do not bill that.
Feasible fix without a GB10: factor the sysfs root into a parameter or inject a capacity-reader closure, then assert the mask actually applied to the calling thread via sched_getaffinity, plus a negative case with a synthetic three-tier root. For C, a host-side self-test that sets and reads back its own affinity; or, at minimum, state plainly in the PR that the C path has no automated check.
S4 — A public API's contract now includes a persistent affinity side effect, applied before validation
Source: Architecture S2 + Architecture nit 3.
helios/src/execution/parallel.rs:527-548 (serve_rank is public, re-exported at helios/src/execution.rs:25):
/// Run a peer's native control loop until coordinated drain and release.
///
/// # Safety
/// The caller retains all graph owners and b12x IPC mappings when drained is
/// false. A failed collective requires coordinated process termination before
/// reclaiming those resources; this function never synchronizes a stranded graph.
pub unsafe fn serve_rank(
manifest: ExecutionManifest,
socket: RankStream,
rank: usize,
world: usize,
) -> Shutdown {
flare_eos::prefer_high_capacity_cpus();
if !manifest.persistent_workers.is_empty() {
return Shutdown {
drained: true,
error: Some(invalid(
"persistent workers are only supported on single-rank cores",
)),
};
}
if let Err(error) = manifest.validate().and_then(|_| wire::validate_completion_packet(&manifest)) {
The doc comment documents only resource lifetime. Two consequences: (a) an embedding caller that reuses the thread afterwards inherits a narrowed mask it never asked for — the Python path calls it inside py.detach(|| unsafe { crate::execution::serve_rank(...) }) (heliopause/src/python.rs:547-548), and the calling thread returns to general use after the detach block; flare-cli/src/main.rs:560 calls it on the peer-rank main thread. (b) ranks rejected immediately at lines 540-547 and 548 still pay the sysfs probe. Charter: "solve the right problem in the right place."
Fix. Document the side effect in the doc comment and move the call after validation (or into the caller), so it is a deliberate action of the process that owns the serving thread. Moot if B1 becomes an explicit setting, since the call then takes an argument.
Candidate Subtract / Simplify
SUB1 — Delete the three-tier midpoint fallback and its test (~36 lines)
Source: Subtractive 2 + Architecture nit 2.
Delete eos/src/unix.rs:195-204 (quoted in full under B1) and the test eos/src/unix.rs:298-314. Why nothing is lost: the guard immediately below at :205 (selected.len() >= 2 && …) already returns None for any sub-2 selection — the safe "leave affinity alone" behaviour the fallback claims to protect. The fallback therefore only changes which set a prime-core SoC gets: a topology outside the charter's stated scope ("SM120/SM121 workstations and DGX Spark") and one the PR never tested. On the stated GB10 target the 90% pass always yields 10 CPUs — asserted by the gb10 test at unix.rs:254-274.
Second-order savings: with the fallback gone, min_cap has no reader, so the min/max loop (unix.rs:176-184) collapses to a single max(), and if min_cap == max_cap { return None } (:185-187) is provably redundant — when all capacities are equal every CPU clears the 90% band, so selected.len() == allowed.len() and :205 already returns None. The 11-line fallback in the C copy disappears with B2's fix.
Adjudication axis: is a three-tier prime-core SoC in scope? If yes, keep (and justify it with named hardware). If no, delete — this is the one concrete answer to AGENTS.md:188-193's "reject fallback layers".
SUB2 — Delete the two non-serving call sites (~5 lines, 2 files)
Source: Subtractive 3+4 + Simplicity 2 + Architecture nit 3.
helios/src/replay.rs:171-176 — the closure exists only to add the call:
let thread = thread::Builder::new()
.name("flare-cuda".into())
.spawn(move || {
flare_eos::prefer_high_capacity_cpus();
run(receiver, completion_sender, ready_sender)
})
ReplayWorker users (grep-verified): heliopause/src/python.rs:86, helios/src/replay/tests.rs (not opened), helios/src/runtime_core/{cooperative,event,programmatic_edge,shared_memory}_tests.rs (not opened). The native server uses RankExecutor, not ReplayWorker.
helios/src/execution/worker.rs:68-74 — pins a worker its own doc comment calls non-serving (worker.rs:36-37: "Synchronous control surface for bootstrap/qualification callers on other threads. The native scheduler owns its rank executor directly without this channel boundary."):
let thread = thread::Builder::new()
.name("flare-execution".into())
.spawn(move || {
flare_eos::prefer_high_capacity_cpus();
ExecutionWorker::new_threaded is used only by helios/tests/tools/tp4_collective.rs (not opened); heliopause uses new_parallel/new. With zero measurements for these paths, docs/design-review.md:112 ("ignition debug-serve timings are diagnostic only") and AGENTS.md:188-193 ("churn"), both are silent behaviour changes with no stated benefit.
Keep: helios/src/server/runtime.rs:568 ("flare-model" — the headline placement result) and helios/src/execution/parallel.rs:539 (serve_rank — multi-host serving); both are quoted at S4 above and in the quotes below.
helios/src/server/runtime.rs:565-569 (KEEP):
let thread = thread::Builder::new()
.name("flare-model".into())
.spawn(move || {
flare_eos::prefer_high_capacity_cpus();
if matches!(peers, Some(crate::execution::RankPeers::Processes(_)))
SUB3 — Do NOT subtract eos/src/windows.rs:219-220 (clearing)
eos/src/windows.rs:219-220:
/// CPU capacity affinity narrowing is implemented for asymmetric Linux topologies.
pub fn prefer_high_capacity_cpus() {}
The stub is load-bearing: eos/src/lib.rs:9-16 re-exports per platform (#[cfg(unix)] pub use unix::*; / #[cfg(windows)] pub use windows::*;) and all four call sites invoke it unconditionally, so deleting it would push #[cfg(unix)] into four Helios lines. Record as cleared so the adjudicator does not "fix" it. (The third, redundant arm at unix.rs:247-248 is a different matter — see N2.)
Correction (no upstream lens had this) — the "missing threaded.rs call site" objection is largely void. Simplicity F2 and Conventions' coverage note both flag that the same-process TP rank threads get no call:
helios/src/execution/threaded.rs:652-654:
let thread = thread::Builder::new()
.name(format!("flare-rank-{}", index + 1))
.spawn(move || {
let _exit_guard = PeerExitGuard(peer_ring.clone());
But those threads inherit their creator's mask, and every production construction of ThreadedExecutor goes through helios/src/execution/ranks.rs:34-36 (RankPeers::Threads(ranks) => ThreadedExecutor::new(...)), whose only production parents are the two call sites SUB2 keeps — helios/src/server/runtime.rs:585 (inside the already-narrowed flare-model thread) and helios/src/execution/parallel.rs:551 (inside already-narrowed serve_rank). Remaining constructors are tests. So SUB2 costs no coverage anywhere, and adding a threaded.rs call is unnecessary. Residual real point worth one line of prose: the PR states the narrowed population as a file list; stating the rule ("the thread that owns the CUDA execution/WFET worker, the RoCE proxy, and the peer-rank entry") is smaller prose and tells the next execution-thread type whether it qualifies.
Candidate Nits
N1 — API/plumbing hygiene: shim bypass, redundant cfg arm, pub selector
Source: Conventions 3+4 + Architecture nit 1. Combined into one mechanical item.
- Shim bypass. Every other Helios host-OS call goes through
crate::os::(helios/src/os.rs:8ispub(crate) use flare_eos::*;; e.g.crate::os::lower_priorityathelios/src/offload/transfer.rs:282(not opened)). The four new lines callflare_eos::prefer_high_capacity_cpus()directly. One-word fix each — and it disappears for two of the four sites if SUB2 is accepted. - Third redundant stub arm.
eos/src/unix.rs:247-248—#[cfg(not(target_os = "linux"))] pub fn prefer_high_capacity_cpus() {}— duplicateswindows.rs:219-220's empty body verbatim.lib.rsalready splits modules bycfg, andlower_priorityis defined once per module (unix.rs:77/windows.rs:160) with no third arm. On Linux+Windows this arm never compiles; on macOS/BSD it is the live definition and the Windows body is unreachable. select_high_capacity_cpusispub(unix.rs:172) although its only caller isprefer_high_capacity_cpusin the same file (:237);fnkeeps the tests working and stops a policy detail becoming exported API.- Placement in
eos/.AGENTS.md:20-22defineseos/as "the host operating-system operations that Helios and Selene use" and exports wholesale (eos/src/lib.rs:9-16), so a serving-affinity policy is now inherited by Selene too. A Helios module would keep the scope visible.
N2 — Doc comments disagree with the code, and one test passes for the wrong reason
Source: Architecture nit 2 + Prose N1.
unix.rs:196-197says the fallback avoids "collapsing multiple busy threads onto a single prime core", but if the high tier holds exactly one CPU the fallback can still select just that CPU and then returnNoneat:205.- The "already restricted to one tier is a no-op" claim is enforced by
selected.len() < allowed_with_capacity.len()at:205, not bymin_cap == max_capat:185— which is why theperformance_onlycase (unix.rs:287-292, capacities 997/1017/1024, i.e. two distinct values) passes. unix.rs:212-214says "non-Linux targets" but the Windows stub a reader would look for lives ineos/src/windows.rs:219-220; name it..agents/skills/repo-prose/SKILL.md(not opened) requires comments to state invariants and non-obvious constraints, not history.
N3 — Description prose, mechanical (one combined item)
Source: Prose N3 + Prose S1's third bullet. Combined per the pre-filter rule.
- Cold-prefill range is misattributed. The description quotes
+2.6% … +17.3%but the two illustrated points are +17.3% (8k) and +9.2% (16k);+2.6%belongs to 32k/64k/128k and is never shown — the worst case is the only unattributed one, and the worst case is what a reviewer weighs. - Self-understatement. "Why" says the p90 wake gap stretches "by more than an order of magnitude"; the evidence reports 61× (1,880.3 → 30.9 µs). Make the two consistent.
- Optional: state whether "same exported core" applies to the CV/tok-s figures as well as the cold-prefill ladder (only the latter says so).
N4 — Cost and stack footprint, low severity
Source: Architecture nit 5 + Correctness nit 2 (cost half).
helios/native/roce_proxy.c:1516-1517 allocates two CPU_SETSIZE arrays (8 KiB with CPU_SETSIZE 1024) on the proxy thread stack:
int cpus[CPU_SETSIZE];
uint32_t caps[CPU_SETSIZE];
And prefer_high_capacity_cpus opens one sysfs file per allowed CPU (20 on GB10) synchronously on the startup path — the first fopen after roce_start is a cold page-cache miss on the thread the GPU kernels immediately wait on — paid even by ranks rejected immediately (see S4 (b)). Both vanish if B2's C deletion and S4's reordering are accepted; otherwise worth one measurement.
Dropped as noise (with reasons, so downstream does not re-derive them)
- All CI red-check /
setup-java/ runner-infra notices: none exist. Head has 0 checks, 0 reviews; the only discussion entry is theflare-autobotcase-file line, which is process metadata, not a finding. - Correctness's "should fix" (vendored divergence), Prose's "blocking B1", Conventions 1, Subtractive 1, Simplicity 1, Correctness nit 1: all the same finding — merged into B2, counted once.
- Correctness nit 3 ("no operator opt-out documented") + Conventions nit 5 ("no durable doc records the policy"): merged into B1; Conventions nit 5's evidence,
docs/prefix-cache-offload.md:863-867, is cited as supporting B1 rather than raised separately. - Simplicity F2 (two call sites only narrow preparation threads) + Architecture's "missing threaded.rs": kept as SUB2, with the correction recorded under SUB3 (threads inherit the narrowed mask; production
ThreadedExecutorparents are already narrowed). - Architecture nit 4 (bundled
pthread_setname_nphunk): folded into B2 — it is part of the same unmarked vendored edit. The name itself is fine and matchesflare-execution/flare-cuda/flare-model. - Windows-not-compiled and x86_64 no-op caveats: verified true and already disclosed in the description — not findings. (But the absence of an arch guard, which makes the x86 claim depend on sysfs rather than on code, is folded into B1.)
- Low-value nitpicks of the new unit tests: dropped. The three tests each assert a distinct claimed behaviour;
unix.rs:254-274is a good GB10 fixture. Only the "correctness of what it asserts" point survives, as N2. docs/TODO.txt:80-86ABI-skew / parity tracking: pre-existing, not caused by this PR — do not bill it here.- No pre-existing CPU-affinity helper existed to reuse (tree-wide
sched_getaffinity/sched_setaffinityhits are only this PR's two copies), so the duplication is internal to this PR, not a reinvention.
Verified as fine — do not re-litigate
- ABI and compatibility unchanged. Proxy ABI stays 14 (
roce_proxy.c:134); no Protobuf, core-format, recipe or transport-layout change; existing exported cores load and serve as before.docs/design-review.md:116-123satisfied. - Operator cpusets are strictly preserved.
nextis populated only from CPUs already in the live mask (unix.rs:224-243,roce_proxy.c:1518-1564), so affinity can only be narrowed, never widened; a cpuset already on one tier no-ops (unix.rs:277-296discounts it). - No env var is read anywhere in the diff (
AGENTS.md:449-452respected in letter); model-agnostic, no per-model branch or alias. - Every call site is the first statement of a freshly spawned thread, so the change races with nothing and cannot leak to a parent or sibling.
- No correctness defect in the affinity logic: every failure path is a no-op, both
u64widenings avoid truncation, and no busy-thread set collapses to one core (:205,roce_proxy.c:1566). "flare-roce"fits the naming scheme, and the call-site shape ("spawn, then configure inside the closure") matcheshelios/src/offload/transfer.rs(not opened) precedent.
Open questions for the adjudicator
- Is a default-on heuristic acceptable at all (B1), or must it be an explicit setting / a documented cpuset recommendation? This one decision resolves or moots S4's shape and most of Conventions' doc nit.
- Is a local patch to the vendored proxy permitted (B2)?
docs/roce-ring.md:362-364says no; the PR does it silently. Either answer (delete the C copy vs mark-and-document the divergence) closes it, but the delete option is smaller and keeps the invariant. - Is a three-tier prime-core SoC in scope (SUB1)? If no — the charter names only SM120/SM121 and DGX Spark — the fallback and its test and the min/max loop should go.
- How were the A/B arms constructed (S1)? Unresolvable from the description or the code; only the author knows, and it determines whether +17.2% may be claimed for this patch under
AGENTS.md:95-102. - Would upstream FlashInfer accept
pin_high_capacity_cpus(local-inference-lab/flashinfer#156)? Determines the divergence's lifetime and therefore the removal condition the docs must state; not knowable from this repo.
Recommendation
Changes requested. The mechanism is small, contained, and demonstrably effective at the placement effect it targets, and the author is candid about host coverage — but the submitted change makes a magic-numbered host-scheduling decision for every Linux deployment with no configuration home, duplicates that policy into a file the repo requires to stay byte-identical to upstream, and backs it with measurements that never compare against main. The cleanest resolution is the subtractive one: delete the 66-line C copy (pin from the creating thread instead), delete the three-tier fallback, delete the two non-serving call sites — ≈47% smaller — make the policy an explicit setting (or document the cpuset recommendation), add one test that covers the sysfs/sched_setaffinity path, and report a paired main-vs-head flare run.