RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Mar 16 12:58:51 UTC 2016
Hi all,
On Wed, 2016-03-16 at 12:46 +0100, Thomas Schatzl wrote:
> Hi Bengt,
>
> On Tue, 2016-03-15 at 16:11 +0100, Bengt Rutisson wrote:
> > Hi again everyone,
> >
> > Here's an updated webrev:
> > http://cr.openjdk.java.net/~brutisso/8151336/webrev.01
> >
> > I removed the extra _has_terminated state and am instead using the
> > ConcurrentMarkThread::should_terminate() state to make sure we
> > don't
> > start a new initial mark if the concurrent mark thread is about to
> > terminate or has already terminated.
> >
> > The _should_terminate state is set in ConcurrentGCThread::stop()
> > where
> > we first take the Terminator_lock with a safepoint check. So, we
> > should
> > be able to rely on this value inside of
> > do_collection_pause_at_safepoint().
>
> I would prefer if the _cmThread->should_terminate() condition
> should
> be inside decide_on_conc_mark_initiation(). It seems to be a quite
> generic condition that should apply anywhere.
>
> Although decide_on_conc_mark_initiation() has only this caller, this
> may cause bugs in the future if keeping it there.
I talked to Bengt about this in detail, and we came to the conclusion
that any simple fix has some kind of wart. We filed
https://bugs.openjdk.java.net/browse/JDK-8151995 to follow up on that.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list