-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: tell jemalloc to use 64-KiB pages when cross building aarch64 #7123
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd like to only do this on arm, not on x86
Sure, I can look into that. Might not be so easy in the Makefile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me
cc @onbjerg when you have time to review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me too, thank you 👑
Fixes #6742.
This PR sets
JEMALLOC_SYS_WITH_LG_PAGE
to 16 for aarch64 cross builds, which will force jemalloc to use 64 KiB pages. This should work with most of the newer arm64 systems which use larger pages. This is an alternative to:I have tested this myself by running
make docker-build-push
on an x86_64 system. I pulled the image (which I pushed to my local docker hub account) on my M1 Mac mini running Linux and it works.Initially, setting the environment variable didn't seem to work. I realized that environment variables weren't being passed to
cross build
, which makes sense because it's a docker container. I had to configure passthrough variables.Link: https://docs.rs/crate/cross/0.1.14
This PR also re-enables jemalloc to be a default feature.