On Wed, 23 Oct 2024 05:33:55 GMT, Axel Boldt-Christmas <abold...@openjdk.org> 
wrote:

>> Ok, I'll change copy_lockstack to both load and clear the oops in the same 
>> method. Now, when we call do_barriers on recurse_thaw we don't clear the 
>> oops, we just load and store the loaded value again. Is it the case that we 
>> just need to do a store, so that already works, or are we missing clearing 
>> the oops from the copied frames?
>
> The store is the important part for SATB. The fact that do_barriers (only) 
> does a self store seems is an optimisation. As we need to do the store before 
>  we do the copy (to enable a plane memcpy). And clearing is not something 
> that we rely on / need at the moment.  The nicest model would have been to 
> first fix the oops, (mem)copy, then clear them.  But as mentioned, clearing 
> is currently unnecessary. For the lockstack we do not need this optimisation 
> as we do the copy when we do the load barrier. So we can just clear in our 
> store.
> 
> It is a little interesting that we template parameterise `do_barriers` on the 
> barrier type and instantiate all the load functions, while only ever using 
> the store version. Guess it is a remnant from some earlier model.

I renamed it to transfer_lockstack() and applied the suggested version with the 
lambda.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1813224287

Reply via email to