Skip to content

Conversation

heiher
Copy link
Contributor

@heiher heiher commented Sep 11, 2025

By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.

By default, jemalloc is configured with a 4K page size. If the
host’s page size is larger than this, it will crash at runtime.
This patch raises the page size to 16K.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@clubby789
Copy link
Contributor

Are you able to add a test for this?

@heiher
Copy link
Contributor Author

heiher commented Sep 12, 2025

Are you able to add a test for this?

It doesn't seem straightforward to add a proper test case for this in rustc, which may also explain why the similar AArch64 patch didn't include one. One of the goals of this patch is to fix the issue that prevents miri from working on LoongArch, where the default jemalloc page size fails to meet the requirements and causes an assertion failure:

https://github.com/tikv/jemalloc/blob/09ad115bc02db60cc9d9338cf0067074d3135fb4/src/pages.c#L759-L766

	os_page = os_page_detect();
	if (os_page > PAGE) {
		malloc_write("<jemalloc>: Unsupported system page size\n");
		if (opt_abort) {
			abort();
		}
		return true;
	}

@Mark-Simulacrum
Copy link
Member

@bors r+

I think proceeding without a test is fine. Without tier 1 support/native runners I wouldn't expect testing this to be particularly easy.

@bors
Copy link
Collaborator

bors commented Sep 12, 2025

📌 Commit 3597951 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 12, 2025
@bors
Copy link
Collaborator

bors commented Sep 12, 2025

⌛ Testing commit 3597951 with merge 4ba1cf9...

@bors
Copy link
Collaborator

bors commented Sep 12, 2025

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 4ba1cf9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 12, 2025
@bors bors merged commit 4ba1cf9 into rust-lang:master Sep 12, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 12, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 5c11fb8 (parent) -> 4ba1cf9 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4ba1cf9ade4c8e2fa10676a50ee34594eb161837 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 3223.3s -> 4174.4s (29.5%)
  2. dist-aarch64-apple: 8342.4s -> 7048.5s (-15.5%)
  3. aarch64-apple: 6260.8s -> 5601.7s (-10.5%)
  4. dist-x86_64-apple: 8720.6s -> 7952.3s (-8.8%)
  5. dist-various-1: 4140.2s -> 3817.5s (-7.8%)
  6. x86_64-gnu-llvm-20-1: 3191.2s -> 3425.6s (7.3%)
  7. aarch64-msvc-1: 6706.2s -> 7192.6s (7.3%)
  8. aarch64-gnu-llvm-19-2: 2377.1s -> 2216.8s (-6.7%)
  9. aarch64-gnu-debug: 3774.5s -> 4006.3s (6.1%)
  10. dist-ohos-aarch64: 4200.7s -> 4449.5s (5.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4ba1cf9): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-1.9%, -1.9%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 468.518s -> 468.868s (0.07%)
Artifact size: 388.10 MiB -> 388.08 MiB (-0.00%)

@heiher heiher deleted the fix-loong-jemalloc-page-size branch September 13, 2025 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants