JDK-8237143 changed G1ConcurrentRefineThread to use a semaphore and surrounding protocol for activation, rather than a Monitor. This was part of eliminating the DirtyCardQ_cbl_mon monitor, getting rid of a lock in the dirty card buffer handling.
The resulting activation protocol is somewhat complicated because it needs to deal with two fairly different clients. One is the dirty card buffer handling from the write barrier, which may need to wake up the "primary" refinement thread. The other is wakeup of additional refinement threads.
Both cases could be simplified by splitting the refinement thread class into two subclasses, one for the primary thread and one for the other threads. The other threads could go back to using monitor-based activation control. Only the primary thread needs to use atomic state and semaphores, and even there the protocol can be made simpler.