On Wed, 23 Oct 2024 18:14:50 GMT, Martin Doerr <mdo...@openjdk.org> wrote:

> This code causes test errors in `CompressedClassPointersEncodingScheme.java` 
> on s390 and PPC64. It forces the shift to `log_cacheline` which is 7 on PPC64 
> and 9 on s390. The test passes when we remove "s > log_cacheline && " from 
> the condition below.

It's a bit late. We are close to pushing. While it should be harmless to drop 
below alignment to below cache line size, this would be a change affecting all 
platforms and would require all tests repeated. 

PPC/s390 are not targeted by the JEP. There had never been a discussion I am 
aware of that these platforms have to be clean with +COH. While it's nice that 
the changes had been contributed, I don't think that test errors on these 
platforms should hold up pushing this RFE. Therefore, if needed, we should just 
omit +COH part of the test for PPC/S390.

But then, what exactly is the error? If it's just the test assuming that cache 
line size is log 6, then the test should be fixed for ppc, not hotspot.

> In addition, it doesn't fit to the comment which claims we should avoid 
> shifts larger than the cacheline size. This enforces shifts to be larger (or 
> equal to) than the cacheline size.

?? The comment is correct. We try to avoid hyper alignment, hence we drop the 
shift to - if possible - log 2 cache line size. If it's equal to log 2 cache 
line size, we succeeded.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1814598543

Reply via email to