RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap

Lin Zang lzang at openjdk.java.net
Fri Oct 9 14:19:10 UTC 2020


On Fri, 9 Oct 2020 11:10:14 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Dear All,
>>   May I ask your help to review this PR? Thanks!
>> -Lin
>
> Hi Lin,
> 
> Sorry for not getting to this sooner. One of the reasons is that I haven't had time to explore a better solution, but
> the above notification triggered me to at least share my thoughts.
> I would like us to avoid having the logic that check how many workers are doing the work and instead have some
> mechanism that claim different chunks of work. You can compare it a bit to G1 where we have the `HeapRegionClaimer`
> that make sure only one thread handles a given region. This claimer needs to be a bit different and allow claiming of
> eden, to-space, from-space and then multiple chunks of old. But I believe such solution would both be more efficient
> (since all threads can help out on old in the end) and easier to follow (no special cases).   So basically the
> `PSScavengeParallelObjectIterator` need to set up this claimer and pass it down to the workers and all workers than try
> to do all work, but only the one getting the claim will do the actual work. What do you think about this approach? Do
> you understand what I'm after?

Hi @kstefanj, Thanks a lot for your comments.
I think there can be a reclaimer that treat eden space, from space, to space and "blocks" in old space as parallel
iteration candidates, then every workers try to claim their ownership of the candidate that it is going to scan. So
there is no need to check worker numbers and Id for processing different spaces.  what do you think?

BTW, Paul (hohensee at amazon.com) also helped review this patch and send the comment in mail list, I will paste his
comments here and then try to polish a patch with all of your comments considered.

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

PR: https://git.openjdk.java.net/jdk/pull/25


More information about the serviceability-dev mailing list