Case file: PR #633 — helios/roce: pin proxy polling thread to high-capacity CPUs and name thread
Open, ready for review, 2026-11-30 08:24, head 70c811bd, base main @ 0a8c20f, +71/−0 in 1 file. Zero comments, zero reviews, no labels, CI failed on head.
Key findings (what the description does not say)
- The entire diff is the identical hunk already carried by open PR #576 (fordbmorris, +230/−1 over 8 files). #576 lists
helios/native/roce_proxy.c (modified, +71 -0)and describes it as "the exactpin_high_capacity_cpus()and"flare-roce"thread-naming hunk merged in local-inference-lab/flashinfer#156 (335459b2)". I compared the two files atpr/576andpr/633:helios/native/roce_proxy.c:1505-1577is byte-identical in both. #633 cites neither #576 nor FlashInfer #156, and neither PR states a merge order; if #633 lands first, #576's author must drop that file and rebase; if #576 lands first, #633 is empty. - #633's author is the reviewer who twice blocked #576 on this exact C hunk. original-el8's 2026-11-28 CHANGES_REQUESTED review of #576, blocker 2: "
helios/native/roce_proxy.cmust remain identical to FlashInfer's pinned…/_roce_proxy.c(not opened) (lines 6-8), and this duplicates 66 lines of untested C capacity-selection logic … Either sync the change through FlashInfer PR #156 first, or applyflare_eos::prefer_high_capacity_cpus()from Rust around proxy thread creation without modifying the vendored C file." #633 is that reviewer landing the hunk themselves after the upstream merge — a maintainer-side resolution of their own blocker, undisclosed in the PR body. - The vendored byte-identity invariant is edited with no provenance note, and NOTICE is now stale.
helios/native/roce_proxy.c:6-8("Keep the source below identical so preparation and serving share the transport ABI"),roce_proxy_dlopen.c:7-9("keeping the vendored roce_proxy.c byte-for-byte identical to FlashInfer"),docs/roce-ring.md:360-364, andNOTICE:16-19("Its implementation is unchanged from that revision", pinned tof5f5341d…) all bear on this file; #633 touches none of them. No test or CI check enforces byte identity (see Project fit). - No performance number in the PR isolates this change. The PR's own scope note says the TP4
flare runverification "integrates the combined SM121/RoCE kernel, recipe, and scheduler optimization set; isolated single-PR TP4 serving A/B was not run separately", and the limitations say "directcpu_capacitysysfs pinning ablation were not run separately". The same 12-cell geomean table (126.61 vs 124.96 tok/s), the same Coding Peak numbers (109.0/110.7/118.0 tok/s) and the same 4× DGX Spark hardware paragraph appear verbatim in same-day scheduler PR #632 by the same author. NoCpus_allowed_list//proc/<pid>/task/*/statusevidence is offered here, unlike #576 which presents exactly that (flare-rocewithCpus_allowed_list=5-9,15-19). - CI failed on
70c811bdand no CI job exercises this code anyway: the Linux leg of.github/workflows/native-serving.yml(not opened) runscargo test --features runtime-core,server(:63) withoutroce, and therdmajob onlycargo checks (:101-113); nobody runs aarch64 or a multi-tier-capacity host. The author's local compile and test counts are the only functional evidence. - Implementation facts a reviewer will want: the sysfs read loop fails closed — the first unreadable/unparseable/zero
cpu_capacityreturns from the whole function (roce_proxy.c:1527-1536), so partially visible sysfs (containers, cpusets) is a complete no-op rather than a partial pin; the affinity result is discarded silently with no log, status, or operator knob (:1566-1568); the thread inherits its mask viapthread_createinroce_start(:1674), so operator cpusets still win.
The change
One file, +71/−0, helios/native/roce_proxy.c (diff reviewed directly). Adds static void pin_high_capacity_cpus(void) at :1505-1569 inside #ifdef __linux__, inserted between run_varlen_op (ends :1503) and proxy_main, and two statements at the top of proxy_main (:1572-1577): (void)pthread_setname_np(pthread_self(), "flare-roce") and pin_high_capacity_cpus().
Verified behaviour:
sched_getaffinity(0, …)at:1513reads the calling thread's mask, i.e. the inherited process/taskset mask; the thread is created bypthread_create(&c->thread, NULL, proxy_main, c)inroce_start(:1674), reached from Rust athelios/src/execution/roce.rs:300(declaration:72), immediately afterroce_connect— no explicit attributes, so clone-based inheritance applies.- Per-CPU sysfs read loop
:1521-1542; abort-on-first-failure at:1528-1536(see Key finding 6). - Tier maths
:1543-1565: bail ifcount < 2ormin_cap == max_cap; selectcaps[i]*10 >= max_cap*9; ifselected < 2, refilter withcaps[i]*2 > min_cap+max_cap; applysched_setaffinityonly when2 <= selected < count. - Nothing else changes:
ROCE_SEND_DEPTH / 6at:784,ROCE_ABI_VERSION 14at:134(:330accessor),RING_WINDOW 8at:183,ROCE_IDLE_SPINS 20000000at:172.helios/src/execution/roce.rsPROXY_ABI = 14untouched. The diff adds no allocation, no new failure path that can poison a rank (void return, ignored). - Description vs diff: every stated before/after claim matches the code; nothing material is missing from the description about the code. What is missing from the description is provenance (#576, FlashInfer #156) and the vendoring rule.
- Scope: #633 is only the C hunk. #576's Rust-side
prefer_high_capacity_cpus()acrosseos/src/unix.rs,helios/src/{server/runtime.rs (not opened), execution/worker.rs (not opened), execution/threaded.rs (not opened), execution/parallel.rs (not opened), replay.rs (not opened)}is not here, so on its own #633 pins only the RoCE proxy thread.
The why
Stated problem: on asymmetric Linux hosts (ARM big.LITTLE / Grace), proxy_main busy-polls the doorbell and the scheduler may place or migrate it onto low-capacity cores, adding latency/jitter to doorbell polling, completion draining, and ring relay forwarding; naming the thread flare-roce makes it visible in profilers.
The premise is corroborated by the code: proxy_main spin-loads ctrl[CTRL_SEQ] (:1586-1657) and only naps 20 µs after ROCE_IDLE_SPINS = 20,000,000 idle polls (:172, :1605-1607).
The concrete measurements behind it live in #576, not in #633: GB10 has 10 Cortex-A725 E-cores (cpu_capacity 718–731) and 10 Cortex-X925 P-cores (997–1024); 48/48 critical threads on X925 across 6 launches vs 4/4 unpinned launches landing on A725; RoceOneshotLaunch C1 width-1 2.77 → 1.91 ms (−31.0%); p90 inter-graph host wake gap 1,880 → 30.9 µs.
No issue tracks this: search_items for affinity/E-core/jitter phrasing returns only #576/#577; #633 declares no linked issue and no "Fixes" reference. The underlying multi-host RoCE transport is recent (helios/native history: proxy landed 2026-10-13, ring relay 2026-10-16, ABI 7/11/14 syncs 2026-10-13, 11-10, 11-13), so the gap is weeks old, not long-standing.
Related work
- #576 (open, fordbmorris, FIRST_TIME_CONTRIBUTOR, Discord woooflet, labels
area:orbit, performance, triage:review, headba2796c0) — carries this identical hunk plus Rust-side pinning; the primary overlap. Its discussion contains the vendoring blocker (Key finding 2), the author's 2026-11-30 00:39 reply thatlocal-inference-lab/flashinfer#156merged at335459b2and the hunk is "byte-for-byte identical", and a Round-2 Autobot review (2026-11-30 03:13) that dropped the C hunk as a blocker and left one Rust-side blocker (selene::shared::codec::cpu_pool()lazyOnceLockhalvingflare-kv-codec-*under--prefix-cache-memory) — a file #633 does not touch. - #577 (open, fordbmorris, opened same minute as #576) — same vendored file, different purpose (
RING_WINDOW8→16, blob 1168→1176, eager relay drain). Its review notes it "edits the same vendoredhelios/native/roce_proxy.cas open sibling PR #576". Three PRs (#576, #577, #633) currently propose changes to this one file. - #632 (open, same author, opened 2026-11-30 08:24 — the same minute as #633) — scheduler calibration ceiling, +216/−33; shares the combined-stack evidence block verbatim (see Key finding 4), indicating a batched split-out of combined-stack work.
- Merged precedents on this file: #279 (jetnet, 2026-11-13) vendored ABI 14 "unchanged below its vendoring header"; #251 (original-el8, 2026-11-10) vendored ABI 11 the same way; #325 (iein, 2026-11-18) fixed ring relay ordering. Every prior change was a verbatim re-vendor, which is why #576's reviewer treated a local edit as a blocker.
- #215 (closed) "Track FlashInfer main in the preparation dependency instead of a pinned commit" — cited by the charter under "Be explicit and pin everything";
pyproject.toml:47still pins flashinferbranch = "main". - Leads followed and found not relevant: #34 (routing/flow-label 2-hop), #232 (direct-cable rails), #280 (WFET serving-loop parking on GB10), #324/#271 (relay ordering, ABI mismatch), #614/#496/#497 (test flakes, Selene disk, offload latency), #554 (Engram RDMA READ). Shell/Autobot boilerplate in #576/#577 ("Call @flare-autobot after push", "Opt-out: #autobot:ignore") is routine repo tooling text, not a directive; #633 itself has no comments at all.
Recent activity
- #589 (merged 2026-11-28, Luke Alonso,
ba3afb13) createdhelios/native/roce_proxy_dlopen.c, which#include "roce_proxy.c"(:236) and states its own reason as "keeping the vendored roce_proxy.c byte-for-byte identical to FlashInfer" (:7-9); it also changedhelios/build.rs:67-77. So the most recent change to this area deliberately isolated the file to keep it untouched. The Autobot Round-2 review of #576 recorded this as a "high" merge risk against it. - The base is current: no commits on
mainsince #633 branched (0a8c20f) touch its changed file, so no rebase collision of the kind #576 hit with #589. helios/nativeowners-of-record in the last 180 days: Jason Cook (4), Luke Alonso (3), jasonc (2), with jetnet and Iein Valdez in the git history (a5b3b2b0#279,999c6159#325).- Commit attribution:
70c811bdis authored in git by "Jason Cook" while the PR is filed by original-el8; #251's merge commite774a468has the same pairing, so this is the standing pattern for this file, not an anomaly.
People
- original-el8 (COLLABORATOR; Discord
el8): a Priority contributor named explicitly in the charter ("Priority contributors (@voipmonitor,@original-el8,@lukealonso) carry extra weight—we never close their PRs out of hand as 'low value'"). 180-day record: 24 merged, 27 closed, 7 open; merged areas docs (14), helios/src (13), helios (5), ignition/preparation (5), ignition/recipes (4). RoCE-specific history: #251 (ABI 11 re-vendor, merged ~15 min after opening) plus upstream commitse350914a,e063d4b6,a36480c7,fd8a8ebf. - fordbmorris (FIRST_TIME_CONTRIBUTOR, Discord
wooflet) is the author of the duplicated #576/#577 hunks and has no mention in #633; nothing gives them a chance to react to their hunk being carried separately. - Reviewers active in this area: original-el8, lukealonso, jetnet, iein. #633's author is therefore simultaneously the area's most senior reviewer and the submitter, with no second reviewer engaged yet.
Community
Zero engagement: pr_comments returns no comments; the item page shows Discussion (0), no reviews, no labels (#576/#577 carry three labels each), and no Autobot/case-file intake comment, which #576, #577 and #632 all received within ~20 minutes of opening. The PR is hours old at snapshot. No reactions, no requests for changes, no acknowledgements.
Project fit
In tension:
- The vendored-identity invariant at
roce_proxy.c:6-8,roce_proxy_dlopen.c:7-9anddocs/roce-ring.md:360-364("keep the vendored source identical to the dependency after its provenance header and verify their ABI and collective-region layouts together") — the edit may well be a legitimate re-vendor of FlashInfer335459b2(asserted in #576, not in #633), but the PR neither says so nor updatesNOTICE:16-19, which keeps asserting "unchanged from that revision" againstf5f5341d. - Nothing enforces the invariant: no test compares the vendored file or its digest to the pinned dependency (
search_codeforroce_proxy.cin*.rsyields onlyhelios/build.rs:69rerun-if-changed and a doc comment athelios/src/execution/roce.rs:11); the only proxy tests are ABI/layout tests (roce.rs:403-406,:433-454). Divergence would be silent. - Charter "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)" — a served-workload result is presented but explicitly disclaimed for this PR in isolation. docs/prefix-cache-offload.md:927-928"Adding CPU affinity requires a serving-latency measurement that shows a benefit" — scoped to offload threads (Autobot dropped that reading for #576), but it is the only in-repo statement on affinity needing measurement.
Aligned:
- Charter Vision ("squeeze the most out of … SM120/SM121 workstations and DGX Spark") — DGX Spark GB10 is exactly the asymmetric-ARM target.
- No new flags, env vars, or per-model branches (charter "No per-model special cases or flags";
docs/design-review.md:89-92), and no new dependency. - Flare's existing thread naming already uses
flare-*(flare-modelhelios/src/server/runtime.rs:639(not opened),flare-http:342,flare-cudahelios/src/replay.rs:172(not opened),flare-executionhelios/src/execution/worker.rs:69(not opened),flare-dashboardhelios/src/server/dashboard.rs:113(not opened));flare-rocefits but appears nowhere indocs/. - By touching only native/, #633 stays out of the scheduler/admission/cancellation surfaces that
docs/design-review.md:232-251makes subject to TLA+/Kani work — a scope difference from #576, not a violation. - Contribution standards ask for why/what/claimed result/evidence; #633 has all four. Whether the commit carries the required
Design-Signed-Off-By: …; design-review=<digest>trailer (docs/design-review.md:294-318,.githooks/commit-msg:14-15,56-63) could not be checked with the available tools —search_historyonly shows subjects, and #576's author had to redo trailers twice for a stale digest and a missing model name.
Claims and evidence
Backed by code (verified here): the ≥90%/midpoint/2 ≤ selected < count rules (:1543-1568); ROCE_SEND_DEPTH / 6 preserved (:784), ABI 14 (:134); no wire/shared-memory change (+71/−0, C only inside proxy_main and the new function); x86_64 Linux is a guaranteed no-op because cpu_capacity sysfs is absent (returns at :1528), as is non-Linux (#ifdef __linux__) and homogeneous masks (:1543).
Claimed, not verified: the strict-compile runs and all test counts (cc -std=gnu11 -Wall -Wextra -Werror 0 warnings; -- execution::roce 30 passed; -- roce 42 passed; runtime-core,server 1,738 passed / 6 failed / 46 ignored; cargo check on flare-cli) — no toolchain available; I only confirmed the needed headers/defines are present (:113-124 includes sched.h (not opened), pthread.h (not opened), stdint.h (not opened), _GNU_SOURCE). Note even the cited tests cannot execute pin_high_capacity_cpus: they need a live RoCE proxy thread, and on x86_64 CI sysfs is absent.
Claimed without isolating evidence: every item in "Claimed benefit and measured results" (see Key finding 4) — the two performance claims (thread stays off low-capacity cores; no change on homogeneous hosts) are asserted by inspection, not observed. The 6 template-fixture failures the author calls pre-existing also appear in #576's and #577's evidence, but since CI failed on head, the actual failing job should be identified rather than assumed.
Reach
- Every multi-host RoCE user:
flare-cli/Cargo.toml:44enableshelioswithroceunconditionally, so releasedflarebinaries contain this code path once a transport connects. - Operators gain a named thread (
flare-roceinps -T,top -H,perf,/proc/<pid>/task/*/comm) and, on multi-tier Linux, a narrowedCpus_allowed_list; they lose nothing in ABI terms (no core-format, Protobuf, or shared-memory change; ABI-14 cores load unchanged; mixed-build clusters interoperate since the change is local scheduling only). - No opt-out exists: the only escape is a
taskset/cpuset mask at launch, which the function respects. There is also no log or signal telling an operator whether pinning engaged — relevant in containers where partial sysfs visibility silently disables it. - Co-residency risk to note: the proxy now shares P-cores with
flare-model, which is the mirror image of the contention #576's Round-2 review flagged forflare-kv-codec-*. - Windows/non-Linux: fully compiled out; no
windows.rs(not opened) stub needed (unlike #576). x86_64: one failedfopenper transport, negligible. - Documentation: nothing updated — no
docs/roce-ring.mdnote onflare-roceor affinity, noNOTICEre-pin. (#576 likewise updated no docs and got the same note; #577 did updatedocs/roce-ring.md.) - Preparation/serving drift:
pyproject.toml:47pins FlashInfer atbranch = "main", so if335459b2is on main the preparation dependency already contains this hunk while Flaremaindoes not. Caveat: nouv.lockexists in the tree despitedocs/model-preparation.md:146-148(not opened) anddocs/roce-ring.md:333telling readers to check it, so the resolved revision cannot be determined from this repository.
Process
Ready for review (not draft), branch perf/roce-proxy-high-capacity-cpus, base main @ 0a8c20f, head 70c811bd, opened and last updated 2026-11-30 08:24 — the same minute as sibling #632. CI: failed. Review: none. Labels: none. No stacked-PR markers, no "depends on" note (unlike #577, which says to merge flashinfer#157 first), and #633 does not mention #576 at all. The unresolved question for whoever decides: which of #576/#633 owns this hunk, and does #633 need a NOTICE update and an upstream reference to satisfy the vendoring contract.
Open questions / could not find
- Which CI job failed on
70c811bd(no logs in the case file); whether the failure is the known template-fixture set. - Whether
70c811bdcarries the mandatedDesign-Signed-Off-Bytrailer and whether itsdesign-reviewdigest matchesmain. - Whether the FlashInfer
335459b2hunk really is byte-identical to what #633 lands — asserted by #576's author, unverifiable from this repo (no FlashInfer checkout, no lockfile). - Whether #576 or #633 is intended to land first, and who will drop the duplicate.