RFR: 8330626: ZGC: Windows address space placeholders not managed correctly [v2]

Stefan Johansson sjohanss at openjdk.org
Tue Apr 23 12:37:46 UTC 2024


> Please review this fix to correctly manage address space placeholders on Windows.
> 
> **Summary**
> On Windows, when using small pages, we use address space placeholders to ensure consistency of the address space.
> 
> When a portion of the address space is mapped these placeholders are replaced by the actual backing and when doing this the size of the placeholder(s) needs to exactly match the size to be backed. For this reason, whenever address space is in use, we split the covering placeholder into multiple `ZGranuleSize` sized placeholders. 
> 
> During recent investigations into fragmentation of the ZGC address space, I found that there was a code code path (**currently not in use**) that did not properly manage these placeholders and we could end up in situations where no placeholder was split off when a new chunk of `ZGranuleSize` size was request. The problem is basically an off by one problem in the splitting code and the fix is to avoid this by changing it to first split the covering placeholder into two parts before splitting the part to be used into granules. 
> 
> **Testing**
> * Manual testing using the included GTest as well as sample applications previously triggering the error case.
> * Tier 1-5 Generational ZGC testing (ongoing)

Stefan Johansson has updated the pull request incrementally with two additional commits since the last revision:

 - Move GTEST_SKIP to setup function
 - StefanK review 2

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18912/files
  - new: https://git.openjdk.org/jdk/pull/18912/files/46d618f3..cae16fec

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18912&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18912&range=00-01

  Stats: 21 lines in 1 file changed: 8 ins; 12 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18912.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18912/head:pull/18912

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


More information about the hotspot-dev mailing list