zlacker

[parent] [thread] 2 comments
1. gavins+(OP)[view] [source] 2023-03-20 20:22:36
The page size dictates the minimum size and alignment requirements for `mmap`, and also for regions of memory with different levels of protection (e.g. read-only vs read+write vs read+execute, etc). If a program expects to be able to `mmap` in 4kb chunks and can't, it will probably not work properly.

On macOS, IIRC the userspace and kernel-space page size can be different and different userspace programs can run with diferent page sizes, however on Linux the page size is currently fixed across the system and set at compile time. The M1's IOMMU only supports 16k-aligned pages, so memory regions that need to be shared with other hardware (e.g. the GPU) need to be 16k-aligned. As such (and because Linux doesn't currently have great support for mixed page sizes), the Asahi Linux project has decided to run with 16k pages globally. However, that breaks a number of applications that are expecting 4k pages.

More info: https://github.com/AsahiLinux/docs/wiki/Broken-Software

replies(1): >>pxc+eU
2. pxc+eU[view] [source] 2023-03-21 01:50:07
>>gavins+(OP)
Damn. There's some really important software on that list: libvirt/QEMU/KVM, LVM, WINE
replies(1): >>worthl+u61
◧◩
3. worthl+u61[view] [source] [discussion] 2023-03-21 03:44:44
>>pxc+eU
I imagine that there will be a lot of work to improve this over the coming years, not just because of asahi, but the cloud ARM systems that are being developed.

I think that Fedora may be leading the pack here, see https://danielpocock.com/power9-aarch64-64k-page-sizes/

[go to top]