RFR: 8269870: PS: Membar in PSPromotionManager::copy_unmarked_to_survivor_space could be relaxed [v2]

Kim Barrett kbarrett at openjdk.org
Wed Jun 26 00:33:10 UTC 2024


On Wed, 19 Jun 2024 19:47:32 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> The acquire-release mem-barrier was probably used/required before but not any more. Inspiration taken from `G1ParScanThreadState::do_oop_evac`.
>
> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
> 
>   pgc-relax-forward

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp line 257:

> 255: 
> 256:   // Now we have to CAS in the header.
> 257:   oop forwardee = o->forward_to_atomic(new_obj, test_mark, memory_order_relaxed);

I think this needs a comment similar to what's in G1ParScanThreadState::do_copy_to_suvivor_space, e.g.
https://github.com/openjdk/jdk/blob/f101e153cee68750fcf1f12da10e29806875b522/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp#L504-L507

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

PR Review: https://git.openjdk.org/jdk/pull/19764#pullrequestreview-2140185222
PR Review Comment: https://git.openjdk.org/jdk/pull/19764#discussion_r1653775636


More information about the hotspot-gc-dev mailing list