RFR: 8227226: Segmented array clearing for ZGC

Per Liden per.liden at oracle.com
Mon Jul 8 12:48:34 UTC 2019


Hi Ryan,

A few general comments:

1) It looks like this still only work for large pages?
2) The log_info stuff should be removed.
3) I'm not a huge fan of single-use utilities like PinAllocating, at 
least not when, IMO, the alternative is more straight forward and less code.
4) Please make locals const when possible.
5) Duplicating _do_zero looks odd. Injecting a "mem clearer", similar to 
what Stefans original patch did, seems worth exploring.

cheers,
/Per

(Btw, I'm on vacation so I might not be super-responsive to emails)

On 2019-07-08 12:42, Erik Österlund wrote:
> Hi Ryan,
> 
> This looks good in general. Just some stylistic things...
> 
> 1) In the ZGC project we like the letter 'Z' so much that we put it in 
> front of everything we possibly can, including all class names.
> 2) We also explicitly state things are private even though it's 
> bleedingly obvious.
> 
> So:
> 
> 39 class PinAllocating {
> 40 HeapWord* _mem;
> 41 public: -> 39 class ZPinAllocating { 40 private:    41 HeapWord* _mem;
>    42
>   41 public: I can be your sponsor and push this change for you. I don't 
> think there is a need for another webrev for my small stylistic remarks, 
> so I can just fix that before pushing this for you. On that note, I'll 
> add me and StefanK to the contributed-by section as we all worked out 
> the right solution to this problem collaboratively. I have run through 
> mach5 tier1-5, and found no issues with this patch. Thanks, /Erik
> 
> On 2019-07-05 17:18, Sciampacone, Ryan wrote:
>> http://cr.openjdk.java.net/~phh/8227226/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8227226
>>
>> This patch introduces safe point checks into array clearing during 
>> allocation for ZGC.  The patch isolates the changes to ZGC as (in 
>> particular with the more modern collectors) the approach to 
>> incrementalizing or respecting safe point checks is going to be 
>> different.
>>
>> The approach is to keep the region holding the array in the allocating 
>> state (pin logic) while updating the color to the array after checks.
>>
>> Can I get a review?  Thanks.
>>
>> Ryan
> 



More information about the hotspot-gc-dev mailing list