[PATCH] D50297: Align AArch64 and i386 image base to superpage

Mark Johnston via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 07:57:56 PDT 2018


markj added a comment.

In https://reviews.llvm.org/D50297#1216935, @ruiu wrote:

> Oh, I didn't notice that you are trying to make a change for i386, not for x86-64. What is your motivation to use superpages for 32-bit applications? I believe that the applications you want to use superpages are large programs and naturally be 64-bit, so I wonder if this change is actually useful.


All executables benefit from being loaded at a superpage-aligned address, assuming that the RO segment is large enough to fill out at least one superpage. The following segments can then be suitably aligned using -z max-page-size. Further, when an application faults on a shared segment (e.g., the text section of an executable), if the fault region is mapped as a superpage in another process, FreeBSD will attempt to create a new superpage mapping in the faulting application, potentially eliding many faults on 4KB pages. This is all mostly orthogonal to the application-specific uses of superpages and applies to i386 as well as x86-64.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50297





More information about the llvm-commits mailing list