34f4fb6411
Excerpted from the original submission: "FreeBSD on several architectures automatically utilizes superpages. So, for the JVM's JIT-compiled code cache and data heap, much of those regions are already using superpages. However, the -XX:+UseLargePages option still serves a useful, if secondary, purpose on FreeBSD. Essentially, it informs the JVM's platform-independent layer what the supported page sizes are. So, when memory is mmap(2)ed and munmap(2)ed within the code cache and data heap, the addresses and sizes will be superpage-aligned and a multiple of the superpage size, respectively. Currently, without this patch, the code cache, for example, typically starts at an unaligned address, so the initial portion of the code cache can never be a superpage. Similarly, unaligned munmap(2)s on the data heap force the kernel to demote superpages to 4KB pages, and this patch eliminates those demotions. This patch both introduces the code needed on FreeBSD to implement -XX:+UseLargePages and deletes code that was copied from Linux that is, to the best of my knowledge, useless on any version of BSD, i.e., UseHugeTLBFS and UseSHM. The additions are in part based on the Solaris version of os_solaris.cpp, e.g., the sorting of the page sizes array." Note I did minor style cleanup and regenerated the patches. Submitted by: alc |
||
---|---|---|
.. | ||
files | ||
distinfo | ||
Makefile | ||
pkg-descr | ||
pkg-message |