perf: pick compacted-region base addresses outside ASLR-occupied zones#14563
Draft
sgraf812 wants to merge 1 commit into
Draft
perf: pick compacted-region base addresses outside ASLR-occupied zones#14563sgraf812 wants to merge 1 commit into
sgraf812 wants to merge 1 commit into
Conversation
Region base addresses are drawn from [0x080000000000, 0x550000000000) instead of [0, 0x7f0000000000), keeping them clear of the PIE executable and heap above 0x555555554000 and of the top-down mmap area that holds shared libraries, thread stacks, and allocator arenas, which reaches down to about 0x700000000000 under high-entropy ASLR. Bases inside those zones make the load-time mmap fail depending on the run's ASLR offsets, forcing the pointer-relocation fallback for the region.
Contributor
Author
|
!bench |
|
Benchmark results for 30883a2 against 76e5ec5 are in. No significant results found. @sgraf812
Small changes (3✅, 1🟥)
|
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR draws the base addresses recorded in compacted-region files from [0x080000000000, 0x550000000000) instead of [0, 0x7f0000000000), so that loading an
.oleanor incremental snapshot succeeds with a plainmmapat the recorded address instead of falling back to the pointer-relocation walk.The previous window overlaps the zones ASLR populates: the PIE executable and heap above 0x555555554000, and the kernel's top-down
mmaparea holding shared libraries, thread stacks, and allocator arenas, which reaches down to about 0x700000000000 under high-entropy ASLR (mmap_rnd_bits= 32). A region base inside those zones fails the load-timemmapdepending on the run's ASLR offsets, and a single failed dependency region forces relocating every pointer into it.compiled/incr_header_loadshows the effect as bimodality: 454M instructions when every region maps at its recorded base, 826M and +70MiB resident when the relocation walk runs, with the slow mode hit in roughly a quarter of runs; anmmaptrace census over 40 runs places every collision between 0x70… and 0x76…, inside thread-stack and arena reservations, and none inside the new window across ~196k fixed-address mappings.Bases are baked into files at save time, so the change takes effect for newly written files; existing files load unchanged through the relocation fallback.