RFR: Locked allocation
Roman Kennke
rkennke at redhat.com
Thu Dec 15 12:10:57 UTC 2016
Am Donnerstag, den 15.12.2016, 13:04 +0100 schrieb Roland Westrelin:
> > And since we couldn't use Mutex (and don't need most of their
> > functionality), the next best way to do it was implement a small
> > cas-
> > based spinlock.
>
> Even a VM Mutex with the no_safepoint_check_flag?
One issue was that Mutex was expecting the thread in VM, unless it's
rank special. We can only be in VM when we have a non-leaf call at the
write barrier.
If I make the lock ranked 'special' I run into asserts that check
correct lock ordering. We need to allocate stuff when evacuating roots,
and this is holding the CodeCache_lock which is also ranked 'special'
etc pp.
We could probably add some extra code for Shenandoah to Mutex that
avoids alls this stuff, but would that be better than implementing the
simple lock as I did?
Roman
More information about the shenandoah-dev
mailing list