RFR: New evacuation-locking protocol

Roman Kennke rkennke at redhat.com
Tue Jun 23 15:09:54 UTC 2020


Hi Aleksey,


> On 6/23/20 11:40 AM, Roman Kennke wrote:
> > 1. Prune the 'old' evac-handler:
> > http://cr.openjdk.java.net/~rkennke/evac-locking/webrev-prune-oom-handler.00/
> 
> *) Indenting change here:
> 
> shenandoahThreadLocalData.hpp:
> -    _satb_mark_queue(&ShenandoahBarrierSet::satb_mark_queue_set()),
> +   _satb_mark_queue(&ShenandoahBarrierSet::satb_mark_queue_set()),
> 

Ok, fixed.

> > 2. Implementation of the new evac-locking:
> > http://cr.openjdk.java.net/~rkennke/evac-locking/webrev-evac-locking.00/
> 
> *) We should probably transplant the protocol rationale comments to
> new files...
> 

I added some comments. Please check it.

> *) This docs are now invalid:
> 
> shenandoahForwarding.hpp:
>   55   /* Tries to atomically update forwardee in $holder object to
> $update.
>   56    * Assumes $holder points at itself.
>   57    * Asserts $holder is in from-space.
>   58    * Asserts $update is in to-space.
>   59    *
>   60    * Returns the new object 'update' upon success, or
>   61    * the new forwardee that a competing thread installed.
>   62    */
>   63   static inline void update_forwardee(oop obj, oop update);
> 

Ok, I fixed/removed the wrong parts.

> *) Removed newline:
> 
> shenandoahHeap.cpp:
> @@ -2013,7 +2018,6 @@
> 
>            collection_set()->clear_current_index();
>          }
> -
>          op_stw_evac();
>          if (cancelled_gc()) {
>            op_degenerated_fail();
> 

Fixed.

> *) I don't think explicit initialization of _evac_failed is needed
> here:
> 
> shenandoahHeap.cpp:
> 
> @@ -495,7 +498,9 @@
>    _bitmap_region_special(false),
>    _aux_bitmap_region_special(false),
>    _liveness_cache(NULL),
> -  _collection_set(NULL)
> +  _collection_set(NULL),
> +  _evac_locking_bitmap(NULL),
> +  _evac_failed()
>  {
>    _heap = this;
> 
> 

Right, fixed.

> *) Indenting is a bit off:
> 
> +  experimental(uintx, ShenandoahEvacLockGranularity,
> 0,                     \
> +          "How coarse to make evac-locking. Default 0 means
> "               \
> +	  "per-HeapWord-locking, higher value make locking coarser
> "        \
> +          "in 2-exponent steps, e.g. one lock per 2^N heap
> words.")         \
> +                                                                    
>         \
> 

Fixed.

> *) This is just (1 + ShenandoahEvacLockGranularity) *
> LogHeapWordSize?
> 
> _shifter(LogHeapWordSize + ShenandoahEvacLockGranularity *
> LogHeapWordSize)
> 

Indeed. Fixed.

http://cr.openjdk.java.net/~rkennke/evac-locking/webrev-prune-oom-handler.01/

and

http://cr.openjdk.java.net/~rkennke/evac-locking/webrev-evac-locking.01/

Better?

Roman




More information about the shenandoah-dev mailing list