RFR: Plab fallback to minsize
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Jan 6 21:29:25 UTC 2023
On Fri, 6 Jan 2023 19:45:14 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> If there is not sufficient memory within a region to allocate the desired size of a PLAB, try to allocate a smaller PLAB that is still larger than the minimum PLAB size. This allows more efficient packing of PLABs into available old-gen heap regions.
>
> This patch has been exercised by an internal CI regression testing pipeline and has not introduced any regressions.
>
> Modest reductions in evacuation efforts are seen on benchmarks that do heavy promotion. This is presumably because there are fewer promotion failures, thus less need to repeatedly copy "old" objects within young-gen spaces. Of note, but not entirely explained, is the observation that some evacuation effort has shifted from mutator threads to GC worker threads.
>
> Some regression in jhiccup pause times were observed. This will be explored further after additional patches are integrated.
Changes look good, modulo general comments for longer-term consideration.
Generally looks good, but I wonder if one should more carefully define the pre- and post-conditions of the two allocate methods to avoid duplicated computation between them (especially wrt minimum size etc.) One way to achieve that would be to have more specialized allocate methods that are called by subsets of clients. Having a leaf method called by several could lead to such duplication of checks. e.g. I see a bunch of "result != null" for values returned from a method that does checks and trimming of its own. If so, the checks in the leaf method for that caller may be wasteful.
This is a general comment, but I'll look more carefully at the code to understand this better.
One question: do PLAB requests that give you smaller PLABs slow down all subsequent PLAB requests in that region? Does this then result in a donwsizing of PLAB requests in the same cycle or subsequent ones? (I guess I am asking how often / what cycle PLAB resizing happens.)
-------------
Marked as reviewed by ysr (Author).
PR: https://git.openjdk.org/shenandoah/pull/195
More information about the shenandoah-dev
mailing list