RFR: JDK-8312469: Print huge page information in error reporting

Thomas Stuefe stuefe at openjdk.org
Mon Aug 7 09:01:31 UTC 2023


On Mon, 7 Aug 2023 06:27:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > The new printout is also less wordy
> 
> Is it? The old printout had one line to shows all available pagesizes whilst the new has one line per available pagesize.
> 
> I'm not sure replacing the existing output is the right thing to do, though ...

Thanks David.

Sorry, my fault; my description has been imprecise.

The old printout printed:

1) two THP parameters, of which the second seemed a bit arbitrary (there would be more interesting candidates, e.g. `/shmem_enabled`), verbatim:


/sys/kernel/mm/transparent_hugepage/enabled: always [madvise] never                                                                                                                                                                                                             
/sys/kernel/mm/transparent_hugepage/defrag (defrag/compaction efforts parameter): always defer defer+madvise [madvise] never


2) the *curated* list of large pages, if the VM is called with large pages, as part of the "OS Memory" section


Memory: 4k page, physical 65773476k(59463004k free), swap 2097148k(2097148k free)
Page Sizes: 4k


This is not optimal because the VM has two lists of page sizes: the "real" one - reflecting the list of page sizes at the OS level - and a curated one that only contains page sizes the JVM is allowed to use. At (2) we only print the latter. For example, if we start the JVM without `+UseLargePages`, the printed list will only show "4K". So, the printed page list is not "the truth" and cannot be used to analyze erroneous OS configuration setups.

`/sys/kernel/mm/transparent_hugepage/enabled: always [madvise] never` is, in the new printout, identical to the `THP mode` printout.

But I see what you mean with wordy. I'll withdraw the PR and massage it a bit to condense the information.

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

PR Comment: https://git.openjdk.org/jdk/pull/14958#issuecomment-1667470889


More information about the hotspot-runtime-dev mailing list