In JDK-8276055 we added a defragmentation mechanism to avoid having small pages in higher parts of the address space. The defragmentation (remapping the page to a lower address) is currently done in the allocation path when a small page is split out of a larger page from the cache.
Remapping the page comes with a cost and to minimize the impact on mutators the defragmentation could be moved out of the allocation path and instead be done when pages are freed after a GC.
Such a move comes with the cost of allowing small pages to reside at higher addresses when used, but as soon as the page is garbage collected the address space will be freed up and the page remapped to a lower address before being cached.
Remapping the page comes with a cost and to minimize the impact on mutators the defragmentation could be moved out of the allocation path and instead be done when pages are freed after a GC.
Such a move comes with the cost of allowing small pages to reside at higher addresses when used, but as soon as the page is garbage collected the address space will be freed up and the page remapped to a lower address before being cached.
- relates to
-
JDK-8340940 ZGC: Select pages in need of defragmentation for the relocation set
- Open
- links to
-
Commit(master) openjdk/jdk/ec020f3f
-
Review(master) openjdk/jdk/21191