loading: read package image object sections into huge pages #63871
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 207 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.319
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #63871"
general
weight: 0.35
KristofferC
The
.jiheap of a split package image was mapped privately from the file. Relocation then writes to every page of the object section, about half of the file, and each first write takes a copy-on-write fault: about 90k faults forusing DataFrames, OrdinaryDiffEq. Read the object section into anonymous memory backed by huge pages instead, where the platform supports them. The sections after it (const_data, symbols, relocations) are mostly read-only or never touched, so they stay file-backed. This is a no-op on macOS and Windows.The CRC part of this PR was split out into #64012. The two changes are independent.
Load times on Linux (
@elapsed using ...in a fresh process, median of 6 interleaved runs, GC disabled, pinned to one NUMA node):| Workload | master (s) | this PR | minor faults | peak RSS |
|---|---:|---:|---:|---:|
| ReverseDiff | 2.116 | -0.0% | 81k → 78k | 414 → 415 MiB |
| DataFrames + OrdinaryDiffEq | 2.144 | -3.3% | 146k → 113k | 722 → 722 MiB |
| CairoMakie | 2.614 | -5.0% | 155k → 117k | 794 → 795 MiB |
| ModelingToolkit | 3.868 | -2.3% | 210k → 177k | 987 → 986 MiB |
| Plots | 0.902 | -3.6% | 75k → 67k | 441 → 442 MiB |
| JuMP + HiGHS | 0.924 | -4.0% | 71k → 60k | 401 → 401 MiB |
| 15 packages together | 12.57 | -3.0% | 511k → 399k | 2323 → 2323 MiB |
When free memory is fragmented (page cache filling the node), the huge-page faults stall on compaction under the default
defrag=madvise, and loading was 1–2.6% slower than master in that state. ReverseDiff is mostly bound by method insertion (JuliaDiff/ReverseDiff.jl#226), so it barely changes.🤖 Generated with Claude Code