-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Different page size support #213
Comments
The size classes need to be redone for a larger page size. It will be incredibly inefficient doing it that way without redoing it. It would require larger bitmaps for the smallest size classes too. |
Ah so it's less of an issue of it breaking software and more of it being inefficient this way? |
It's not set up for pages of that size. For example, 16 byte allocations are placed in a slab with 256 slots, which is 4096 bytes. The slab size will be rounded up to 65536 but only the first 4096 bytes will be used. For one thing, all the slot counts need to be redone, but 256 is currently the maximum number of slots with the current implementation. Replacing the array of 4x 64-bit integers with an array of 64x 64-bit integers is not a reasonable approach. It would need to use a multi-level bitmap or another approach. |
That's quite a bit beyond my knowledge, and it does sound like it would need a rewrite. |
For what it's worth, I tried using the same ppc64el machine with Debian 12 on a 4K kernel to see if things work and they seem to do. Everything is working as expected, even the single app I have that crashes under x86_64 seems to crash here :p If this helps this is my environment: The only thing that needs a change in the code is the Makefile to support -mcpu=native instead of -march=native since -march isn't supported on POWER I'll send a tiny patch that checks if the system is POWER to use -mcpu instead of -march Thanks again for this awesome code! |
As an Asahi Linux user I would really love to see support of 16k pages <3 |
It will only happen if a contributor works on it. We have no use for it in GrapheneOS. |
Android seems to be adding 16K page support in the future. |
It's almost there, and the |
Are there any plans to support larger page sizes? I have done some rudimentary testing on Debian 12 ppc64el by manually setting the page size in pages.h to 65536 and disabling the static_assert in h_malloc.c to see if things break ( I am adventurous :P )
Running simple programs seems everything works fine, and using "make test" also produces no errors.
I will gladly do testing or work on supporting larger page sizes if possible.
EDIT: Even chromium seems to run fine, I hope I didn't corrupt my profile.
The text was updated successfully, but these errors were encountered: