RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits (original) (raw)
Bengt Rutisson bengt.rutisson at oracle.com
Wed Mar 16 12:50:41 UTC 2016
- Previous message (by thread): RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
- Next message (by thread): RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Thomas,
Thanks for looking at this!
On 2016-03-16 12:46, 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 hasterminated state and am instead using the ConcurrentMarkThread::shouldterminate() 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 shouldterminate state is set in ConcurrentGCThread::stop() where we first take the Terminatorlock with a safepoint check. So, we should be able to rely on this value inside of docollectionpauseatsafepoint(). I would prefer if the cmThread->shouldterminate() condition should be inside decideonconcmarkinitiation(). It seems to be a quite generic condition that should apply anywhere. Although decideonconcmarkinitiation() has only this caller, this may cause bugs in the future if keeping it there.
I discussed this offline with Thomas. We agree that the proper way of doing this is to add information to the G1CollectorState class to keep track of whether or not the concurrent mark thread is running.
However, doing that in a thread safe manner requires some more thinking and testing. So, instead I will push what was proposed in webrev.01 and I filed this RFE to keep track of the remaining work:
JDK-8151995: Move CM Thread execution state into G1CollectorState https://bugs.openjdk.java.net/browse/JDK-8151995
Thanks, Bengt
Thanks, Thomas
- Previous message (by thread): RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
- Next message (by thread): RFR: JDK-8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]