Integrated: 8330626: ZGC: Windows address space placeholders not managed correctly
Stefan Johansson
sjohanss at openjdk.org
Wed Apr 24 12:06:45 UTC 2024
On Tue, 23 Apr 2024 11:38:17 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
> 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)
This pull request has now been integrated.
Changeset: e311ba32
Author: Stefan Johansson <sjohanss at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/e311ba32a517a6389c683c3597d78f66fe52991e
Stats: 232 lines in 3 files changed: 223 ins; 0 del; 9 mod
8330626: ZGC: Windows address space placeholders not managed correctly
Reviewed-by: stefank, aboldtch
-------------
PR: https://git.openjdk.org/jdk/pull/18912
More information about the hotspot-dev
mailing list