RFR: 8378675: PPC64: increase instruction cache line size [v2]
Richard Reingruber
rrich at openjdk.org
Thu Feb 26 08:44:28 UTC 2026
On Wed, 25 Feb 2026 14:56:15 GMT, David Briemann <dbriemann at openjdk.org> wrote:
>> Set the instruction cache line size for Power to 128 bytes.
>>
>> Add functions to retrieve the data cache line size and instruction cache line size from the system (AIX & Linux).
>
> David Briemann has updated the pull request incrementally with two additional commits since the last revision:
>
> - add comments that explain getconf behavior
> - update copyright headers
src/hotspot/os/linux/os_linux.cpp line 5389:
> 5387: int size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
> 5388: // On some Linuxes this is not available, then return DEFAULT_CACHE_LINE_SIZE.
> 5389: return (size == 0) ? DEFAULT_CACHE_LINE_SIZE : size;
Suggestion:
return (size <= 0) ? DEFAULT_CACHE_LINE_SIZE : size;
The man page says that sysconf returns -1 on error (e.g. if the queried name is unknown).
src/hotspot/os/linux/os_linux.cpp line 5396:
> 5394: int size = sysconf(_SC_LEVEL1_ICACHE_LINESIZE);
> 5395: // On some Linuxes this is not available, then return DEFAULT_CACHE_LINE_SIZE.
> 5396: return (size == 0) ? DEFAULT_CACHE_LINE_SIZE : size;
Suggestion:
return (size <= 0) ? DEFAULT_CACHE_LINE_SIZE : size;
The man page says that sysconf returns -1 on error (e.g. if the queried name is unknown).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29918#discussion_r2857712624
PR Review Comment: https://git.openjdk.org/jdk/pull/29918#discussion_r2857712860
More information about the hotspot-dev
mailing list