Integrated: JDK-8310388: Shenandoah: Auxiliary bitmap is not madvised for THP

Thomas Stuefe stuefe at openjdk.org
Fri Aug 4 18:42:44 UTC 2023


On Thu, 20 Jul 2023 11:19:53 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> See details in JBS isse.
> 
> Note that there is no actual functional difference. AUX bitmap did not use THPs before this patch and does not now either. The only difference is that before, the JVM *thought* the AUX bitmap uses THPs when in fact it did not. That caused confusion.
> 
> (All this illuminates how badly thought out the ReservedSpace API really is. We pass in page size to the constructor, but then need to commit manually; THPs actually use madvise on commit, not on reservation, so we need to pass page size in *again* to commit. Ideally, ReservedSpace should handle committing for us with the page size it saved from reservation.)
> 
> Note that this only takes care of preventing THP formation in "madvise" mode. In "always" mode, the kernel will do THP coalescation always. We could prevent it from doing so by advising against it via madvise, but that would require extension of the platform generic reservation APIs and is left for a different RFE. Ideally, nobody should use THP "always" mode.

This pull request has now been integrated.

Changeset: 017e0c78
Author:    Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/017e0c7850e305877e3e0b1d4644b5605225e07c
Stats:     11 lines in 1 file changed: 9 ins; 0 del; 2 mod

8310388: Shenandoah: Auxiliary bitmap is not madvised for THP

Reviewed-by: shade, kdnilsen

-------------

PR: https://git.openjdk.org/jdk/pull/14953


More information about the shenandoah-dev mailing list