Integrated: 8300119: CgroupMetrics.getTotalMemorySize0() can report invalid results on 32 bit systems

2023-01-19 Thread Jonathan Dowland
On Wed, 18 Jan 2023 13:20:06 GMT, Jonathan Dowland wrote: > This is a fix for https://bugs.openjdk.org/browse/JDK-8300119 > (CgroupMetrics.getTotalMemorySize0() can report invalid results on 32 bit > systems). Thanks to @jerboaa Severin Gehwolf for figuring out the solution. > &

RFR: 8300119: CgroupMetrics.getTotalMemorySize0() can report invalid results on 32 bit systems

2023-01-18 Thread Jonathan Dowland
This is a fix for https://bugs.openjdk.org/browse/JDK-8300119 (CgroupMetrics.getTotalMemorySize0() can report invalid results on 32 bit systems). Thanks to @jerboaa Severin Gehwolf for figuring out the solution. The problem is demonstrated by test/hotspot/jtreg/containers/docker/TestMemoryAware

Integrated: 8292541: [Metrics] Reported memory limit may exceed physical machine memory

2022-08-26 Thread Jonathan Dowland
On Thu, 25 Aug 2022 09:50:44 GMT, Jonathan Dowland wrote: > When the container memory exceeds the physical host's memory, the Java > metrics reporting is wrong. > > https://bugs.openjdk.org/browse/JDK-8292541 > > This is the equivalent core-libs fix for Hotspot&#

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v6]

2022-08-26 Thread Jonathan Dowland
On Fri, 26 Aug 2022 13:32:35 GMT, Severin Gehwolf wrote: >> Jonathan Dowland has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains ten commits: >> >> - Rework testContainerMemExceedsPhysical to use common hos

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v7]

2022-08-26 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request incrementally with one additional commit since the last revision: Pass hostMaxMem to relevant methods as a parameter - Changes: - all: https://git.openjdk.org/jdk/pull/10017/file

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v6]

2022-08-26 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Rework testContainerMemExceedsPhysical to use common hostMaxMem For 8292541, I wrote tw

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v5]

2022-08-26 Thread Jonathan Dowland
On Thu, 25 Aug 2022 16:15:53 GMT, Jonathan Dowland wrote: >> When the container memory exceeds the physical host's memory, the Java >> metrics reporting is wrong. >> >> https://bugs.openjdk.org/browse/JDK-8292541 >> >> This is the equivalent core-libs

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v5]

2022-08-26 Thread Jonathan Dowland
On Fri, 26 Aug 2022 09:46:16 GMT, Severin Gehwolf wrote: >> Jonathan Dowland has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a log-line for total physical memory >> >> This is relied upon

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 16:33:57 GMT, Severin Gehwolf wrote: >> I've pushed a small excerpt of the changes from #9880 in >> 1bf3aa341fd93079289f11e620938e6bed40b382 to this PR in order to add the log >> lines that the tests depend on. > > We cannot have this in both PRs, though. Indeed: even witho

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 16:09:01 GMT, Severin Gehwolf wrote: >> test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java line 53: >> >>> 51: DockerRunOptions opts = Common.newOpts(imageName); >>> 52: String goodMem = Common.run(opts).firstMatch("total physical >>> memory: (\\d+

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v5]

2022-08-25 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request incrementally with one additional commit since the last revision: Add a log-line for total physical memory This is relied upon for tests in test/hotspot/jtreg/containe

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 14:00:36 GMT, Severin Gehwolf wrote: >> Jonathan Dowland has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address nit >> >> Thanks Thomas Stuefe > > src/jav

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v4]

2022-08-25 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request incrementally with two additional commits since the last revision: - use pre-defined constant over magic number - Address style nits - Changes: - all: https://git.openjdk.org/j

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 12:35:13 GMT, Jonathan Dowland wrote: >> When the container memory exceeds the physical host's memory, the Java >> metrics reporting is wrong. >> >> https://bugs.openjdk.org/browse/JDK-8292541 >> >> This is the equivalent core-libs

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v2]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 10:09:32 GMT, Thomas Stuefe wrote: >> Jonathan Dowland has updated the pull request incrementally with one >> additional commit since the last revision: >> >> avoid calling subsystem.getMemoryLimit twice > > src/java.base/linux/native/l

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request incrementally with one additional commit since the last revision: Address nit Thanks Thomas Stuefe - Changes: - all: https://git.openjdk.org/jdk/pull/10017/files - new: http

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v3]

2022-08-25 Thread Jonathan Dowland
On Thu, 25 Aug 2022 10:02:22 GMT, Thomas Stuefe wrote: >> Jonathan Dowland has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address nit >> >> Thanks Thomas Stuefe > > src/jav

Re: RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory [v2]

2022-08-25 Thread Jonathan Dowland
-8292083) > (https://github.com/openjdk/jdk/pull/9880) Jonathan Dowland has updated the pull request incrementally with one additional commit since the last revision: avoid calling subsystem.getMemoryLimit twice - Changes: - all: https://git.openjdk.org/jdk/pull/10017/files - new

RFR: 8292541: [Metrics] Reported memory limit may exceed physical machine memory

2022-08-25 Thread Jonathan Dowland
When the container memory exceeds the physical host's memory, the Java metrics reporting is wrong. https://bugs.openjdk.org/browse/JDK-8292541 This is the equivalent core-libs fix for Hotspot's [JDK-8292083](https://bugs.openjdk.org/browse/JDK-8292083) (https://github.com/openjdk/jdk/pull/9880)