RFR: Put regulator thread stop after gc thread iteration is prevented

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Mar 22 08:14:33 UTC 2023


On Tue, 21 Mar 2023 21:47:10 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Record that shutdown sequence has begun before we request the regulator thread to stop.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2365:

> 2363:   // Step 0a. Stop requesting collections.
> 2364:   regulator_thread()->stop();
> 2365: 

May be rename them Steps 0.a and 0.b in the order in which they are executed?

Could you state the advantage of doing steps in this rather than the old order? (I confess I looked at the code but couldn't find an immediate reason why this may be preferable to the previous order, e.g. does it accelerate the shutdown if the actions are in this new order, or something else such as prevention of a potential deadlock or a crash?)

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/231#discussion_r1144372703


More information about the shenandoah-dev mailing list