RFR: JDK-8304954: SegmentedCodeCache fails when using large pages [v4]

Damon Fenacci dfenacci at openjdk.org
Tue Jul 25 12:36:12 UTC 2023


On Tue, 25 Jul 2023 07:54:41 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> I've used the buffer since the message is used in 2 different places:
>> https://github.com/openjdk/jdk/blob/e1b09a9fe267d6aa48f4656652411000a4f4d2ee/src/hotspot/share/code/codeCache.cpp#L317-L323
>> (not 100% sure why, but I've noticed that it is how warnings are handled in other places in the code)
>
> Ah. missed the second warning. You don't need both. log_warning should be enough and mirrors what we usually do in other places. I assume "warning" is a relict from a time before UL.

Ok. I've changed it to use only `log_warning` with varargs. Thank you!

>> Right, thanks!
>> 
>> There is just this point that it is not completely clear to me:
>>> * code cache could, in theory, be satisfied with large pages, but its size is not aligned with large page size. E.g. 2MB pages and CodeCacheSize=101m, would result in code cache using 4KB pages.
>> 
>> Do you mean that with such a configuration (2MB pages and CodeCacheSize=101m) would the code cache use 4KB pages anyway later on? Wouldn't `CodeCache::page_size` return 2MB pages (and possibly align the code cache to 102MB)? (I guess I'm missing something here)
>
> I may be wrong too. Looking closer, I think it aligns up. So, I think you can forget the first of the two points. Sorry for the confusion.

I've changed "reserve" into the more generic "use" in the message.
To check for the actual large page size I've used the same `page_size` method giving 1 as minimum number of pages (`default_large_page_size` seems to be specific for linux)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14903#discussion_r1273460205
PR Review Comment: https://git.openjdk.org/jdk/pull/14903#discussion_r1273458530


More information about the hotspot-compiler-dev mailing list