Transition to using 16 KB page sizes for Android apps and games
android-developers.googleblog.com
Transition to using 16 KB page sizes for Android apps and games
1–10 of 70 posts
Re: Transition to using 16 KB page sizes for Android apps and games
#2Re: Transition to using 16 KB page sizes for Android apps and games
#3Weird. AFAIK 4K and 64K were the common ARM64 page sizes, and 16K was the odd "think different" one that Apple uses. No mention of 16K in the Linux kernel docs: https://www.kernel.org/doc/html/next/arm64/memory.html
https://developer.arm.com/documentation/101811/0104/Translat...
Re: Transition to using 16 KB page sizes for Android apps and games
#4Re: Transition to using 16 KB page sizes for Android apps and games
#5I can understand the desire for google to want devs to recompile their apps, but I don't see the need to dump old apps from the app store... who cares if an old app that works wastes 12k if it only needs a single 4k page?
In any case, I assume that there is something similar affecting Android.
Re: Transition to using 16 KB page sizes for Android apps and games
#6Weird. AFAIK 4K and 64K were the common ARM64 page sizes, and 16K was the odd "think different" one that Apple uses. No mention of 16K in the Linux kernel docs: https://www.kernel.org/doc/html/next/arm64/memory.html
Re: Transition to using 16 KB page sizes for Android apps and games
#7I can understand the desire for google to want devs to recompile their apps, but I don't see the need to dump old apps from the app store... who cares if an old app that works wastes 12k if it only needs a single 4k page?
Re: Transition to using 16 KB page sizes for Android apps and games
#8Re: Transition to using 16 KB page sizes for Android apps and games
#9I can understand the desire for google to want devs to recompile their apps, but I don't see the need to dump old apps from the app store... who cares if an old app that works wastes 12k if it only needs a single 4k page?
I am not familiar with Android, but Linux ELF binaries that specify 4KB alignment will not work on systems with 16KB page sizes, since the ELF interpreter will refuse to load them. This hit me recently when trying to run a 32-bit binary on a Linux ARM system that had 16KB size pages, since the 32-bit OpenSSL libraries specified 4KB alignment. Presumably, this was done for maximizing entropy available to ASLR, but it…
Re: Transition to using 16 KB page sizes for Android apps and games
#10Earlier quoted context omitted.
I am not familiar with Android, but Linux ELF binaries that specify 4KB alignment will not work on systems with 16KB page sizes, since the ELF interpreter will refuse to load them. This hit me recently when trying to run a 32-bit binary on a Linux ARM system that had 16KB size pages, since the 32-bit OpenSSL libraries specified 4KB alignment. Presumably, this was done for maximizing entropy available to ASLR, but it…
Page size impacts page permissions; it's not a matter of wasting 12k, it's that with 4kb pages you're allowed to have a consecutive 8kb region with different permissions. 16kb pages can't do that without segfaulting every time memory is used "wrong", and trying to fix that up transparently would be a nightmare.
I would natively imagine the kernel could trap that and remap on the fly, at the tiny cost of murdering performance. Is that untrue, or is the perf so bad that it's not worth it?