RFR: 8361376: Regressions 1-6% in several Renaissance in 26-b4 only MacOSX aarch64 [v5]
Dean Long
dlong at openjdk.org
Thu Aug 7 08:47:19 UTC 2025
On Wed, 6 Aug 2025 02:54:22 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Thanks for implementing nice code for PPC64! I appreciate it! The shared code and the other platforms look fine, too.
>> Maybe atomic bitwise operations could be used, but I'm happy with your current solution.
>
>> Thanks @TheRealMDoerr . I didn't even consider atomic bitwise operations, but that's a good idea. I'm not in a hurry to push this, so if you could provide an atomic bitwise patch for ppc64, I would be happy to include it. In the mean time, I'm still investigating the ZGC regression. If I can figure it out, I might want to include a fix for ZGC in this PR as well.
>
> Not a review, just a drive-by comment.
> We've had Atomic bitops for a while now.
> Atomic::fetch_then_{and,or,xor}(ptr, bits [, order])
> Atomic::{and,or,xor}_then_fetch(ptr, bits [, order])
> They haven't been optimized for most (any?) platforms, being based on cmpxchg.
> (See all the "Specialize atomic bitset functions for ..." related to
> https://bugs.openjdk.org/browse/JDK-8293117.)
Thanks @kimbarrett. I see that the Atomic::fetch_then_XXX() implementation is very similar to what I came up with. The operation I'm doing is sometimes setting a single bit, so fetch_then_or() could be used, but sometimes the operation is setting the other 31 bits, so a new fetch_then_set_with_mask() would need to be added.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26399#issuecomment-3163131928
More information about the hotspot-dev
mailing list