Skip to content
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

Compile jemalloc with 16 KiB page size on arm #1914

Closed
wants to merge 2 commits into from

Conversation

Diatrus
Copy link

@Diatrus Diatrus commented Mar 29, 2022

This is needed for kernels with 16 KiB page sizes (currently the kernel for the Apple M1).
This was tested on a 16 KiB kernel does not cause any functionality regression.

See the following discussion for why page size must be set higher or equal to expected:
jemalloc/jemalloc#467 (comment)

@kmihelich
Copy link
Member

How about on a 4k kernel? Everything here is currently 4k.

@Diatrus
Copy link
Author

Diatrus commented Mar 30, 2022

How about on a 4k kernel? Everything here is currently 4k.

According to the linked comment and subsequent reading of the actual configure argument, it should work on 4K. However, I do not personally have a device that currently supports a 4 KiB page size kernel and would appreciate help with a proper test in that regard.

@Diatrus Diatrus changed the title Compile jemalloc with 64 KiB page size on arm Compile jemalloc with 16 KiB page size on arm Mar 30, 2022
@Diatrus
Copy link
Author

Diatrus commented Mar 30, 2022

@kmihelich I have decreased the compiled page size to 16 KiB, as I would say it’s unlikely ALARM will ship a 64 KiB kernel anytime soon. I can squash later if need-be.

@jannau
Copy link
Contributor

jannau commented Apr 1, 2022

Using jemalloc compiled for a larger page size than the system's page size is not problem. rust with static copy of jemalloc work with this patch changing the page size to 64k on systems with 4k and 16k kernel page size without problems.

@leifliddy
Copy link

leifliddy commented Aug 14, 2022

So it looks like Fedora sorted out this issue the same way four years ago by including the following logic in their version of a PKGBUILD

# Override PAGESIZE, bz #1545539
%ifarch %ix86 %arm x86_64 s390x
%define lg_page --with-lg-page=12
%endif

%ifarch ppc64 ppc64le aarch64
%define lg_page --with-lg-page=16
%endif

https://bugzilla.redhat.com/show_bug.cgi?id=1545539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants