On Thu, 16 Sep 2021 17:11:30 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

> Partition safepoint checking and nonchecking lock ranks. The nonchecking 
> locks are always lower ranked than the safepoint checking locks because they 
> cannot block.
> 
> This moves some leaf locks to 'nosafepoint' rank and corrects relative 
> ranking.
> 
> Tested with tier1-6 and built and run tier1 tests with shenandoah locally.

Hi Coleen,

Mostly the remapping seems okay but a few queries below.

Thanks,
David

src/hotspot/share/gc/parallel/psCompactionManager.cpp line 95:

> 93:   _shadow_region_array = new (ResourceObj::C_HEAP, mtGC) 
> GrowableArray<size_t >(10, mtGC);
> 94: 
> 95:   _shadow_region_monitor = new Monitor(Mutex::nosafepoint, 
> "CompactionManager_lock",

Not clear why this one needed to change??

src/hotspot/share/runtime/mutex.hpp line 55:

> 53:        nosafepoint    = oopstorage     +   6,
> 54:        leaf           = nosafepoint    +   6,
> 55:        safepoint      = leaf           +  10,

It is somewhat confusing to have safepoint as an explicit rank now that all 
ranks above nosafepoint imply safepoint-ing.

src/hotspot/share/runtime/mutexLocker.cpp line 253:

> 251:   def(ClassInitError_lock          , PaddedMonitor, leaf+1,      true,  
> _safepoint_check_always);
> 252:   def(Module_lock                  , PaddedMutex  , leaf+2,      false, 
> _safepoint_check_always);
> 253:   def(InlineCacheBuffer_lock       , PaddedMutex  , nosafepoint-1, true, 
>  _safepoint_check_never);

Why -1 ?

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

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

Reply via email to