CRR (XS): 7098085: G1: partially-young GCs not initiated under certain circumstances

Ramki Ramakrishna y.s.ramakrishna at oracle.com
Wed Oct 5 23:41:24 PDT 2011


Doing some late night  loud thinking here ... so please take this
with an adequate dose of salt....

I am not sure joining or leaving the suspendible thread set
says anything about the actual intent of that action. In other words
the suspendible thread set is a mechanism or an implementation
of what is actually a synchronizing mechanism -- the intent is
that the actions in a {join; act; leave} scope are those that
want to somehow control the synchronization points of their
execution wrt safepoints because safepoints will probably
step on their toes or manipulate the same values. It's
really a form of mutual exclusion.

In the same vein, the reverse namely {leave; act; join} seems
to be an explicit mechanism to get out of a synchronizing protocol
wrt safepoints (in this case presumably because such synchronization
would otherwise cause circular dependencies that might result in
a deadlock).

Thus while the suspendible thread sets is a specific implementation,
the high level idea involves synchronization wrt JVM safepoints
during which foreground gc's may do stuff to the same structures
that the wrapped actions are manipulating.

It is for that reason that I had suggested the name 
"SynchronizeWithSafepoints"
although that is not an adequate name either. (Perhaps your
suggestion of a name that describes the mechanism/implementation
may be better suited because of the inadequacy of my suggestion.)
Hopefully someone will think of a better name than either of these.

-- ramki

On 10/5/2011 5:52 PM, Tony Printezis wrote:
>
>
> On 10/5/2011 8:27 PM, Tony Printezis wrote:
>>> [1] you will have to invent a suitable other name, perhaps 
>>> DesynchronizeWithSafepoints
>>> for when you do the reverse, i.e. perform an action outside of the 
>>> _sts, as happens
>>> when you are doing those synch barriers amongst the concurrent marking
>>> threads in case of overflow and restart.
>>
>> I can't think of a good name off-hand but I'll think about it for a 
>> bit... (suggestions are welcome!) 
>
> How about JoinSuspendibleThreadSet / LeaveSuspendibleThreadSet, example:
>
> {
>   JoinSuspendibleThreadSet x;
>   ...
> }
>
> Both sound very descriptive to me. Alternatively, maybe 
> InsideSuspendibleThreadSet / OutsideSuspendibleThreadSet?
>
> I'd love to have something like MutexLocker / MutexUnlocker but I 
> can't think of an appropriate noun (SuspendibleThreadSetJoiner?!?!?!? 
> this sounds SO wrong!).
>
> Tony


More information about the hotspot-gc-dev mailing list