← Back to Pull requests

loading: read package image object sections into huge pages #63871

Closed
unknown closed this pull request without merging on Oct 22, 2026 14:08 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 11:33 UTC
Author

The .ji heap 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 for using 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

Diff: 207 lines (+155 / -52) across 2 files Reviewer: KristofferC Review duration: 8795m
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
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.4% (MEDIUM) · Higher = larger blast radius
36.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.4% · Safe to merge
14.4%