RFR: 8237842: Separate definitions for default cache line and padding sizes
Stefan Karlsson
stefank at openjdk.org
Wed Dec 6 10:01:35 UTC 2023
On Tue, 5 Dec 2023 11:23:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> [JDK-8321137](https://bugs.openjdk.org/browse/JDK-8321137) needs a clean separation between cache line sizes and padding sizes. At least on x86, there is a wrinkle with "assuming" the cache line size is 128 bytes to cater for prefetchers. Cleanly separating cache line size and padding size resolves this. I rewrote uses of `DEFAULT_CACHE_LINE_SIZE` in padding contexts to new macro.
>
> The goal for this patch is to avoid actual values changes as much as possible. One of the changes come from cleaning up some of the old cases in x86 definition, thus simplifying the definition. I think the LP64 split is still useful there.
>
> Additional testing:
> - [x] Large build matrix of server/zero builds
> - [x] Linux AArch64 server fastdebug, `tier{1,2}`
> - [x] Linux x86_64 server fastdebug, `tier{1,2}`
Sure. It think it is a good patch. However, given that you added this commment:
// Hardware prefetchers on current implementations may pull 2 cache lines
// on access, therefore we pessimistically assume twice the cache line size
// for padding.
Do you have anything that backs up the claim that this is the case for "current implementations"? Maybe @sviswa7 can help answering if this is still the case for Intel hardware?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16973#issuecomment-1842555270
More information about the hotspot-dev
mailing list