Re: RFR: JDK-8293114: JVM should trim the native heap [v14]

2023-07-21 Thread David Holmes
On Fri, 21 Jul 2023 12:20:25 GMT, Thomas Stuefe wrote: >> Marked as reviewed by rehn (Reviewer). > > Many thanks @robehn, @shipilev and @dholmes-ora ! > > Feels good to have this finally in. @tstuefe unfortunately the test is failing intermittently in our CI. I will file a bug and assign it to

Re: RFR: JDK-8293114: JVM should trim the native heap [v14]

2023-07-21 Thread Thomas Stuefe
On Thu, 20 Jul 2023 08:26:21 GMT, Robbin Ehn wrote: >> Thomas Stuefe has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 42 additional >> commits si

Re: RFR: JDK-8293114: JVM should trim the native heap [v14]

2023-07-20 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v13]

2023-07-20 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v12]

2023-07-20 Thread Robbin Ehn
On Fri, 14 Jul 2023 20:03:24 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v12]

2023-07-18 Thread Thomas Stuefe
On Fri, 14 Jul 2023 20:03:24 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v12]

2023-07-17 Thread David Holmes
On Fri, 14 Jul 2023 20:03:24 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-17 Thread Thomas Stuefe
On Fri, 14 Jul 2023 06:43:15 GMT, David Holmes wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bikeshed Trim log lines > > Test needs a fix for non-Linux. @dholmes-ora Are you okay with this final version? Did yo

Re: RFR: JDK-8293114: JVM should trim the native heap [v12]

2023-07-17 Thread Aleksey Shipilev
On Fri, 14 Jul 2023 20:03:24 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-14 Thread Thomas Stuefe
On Fri, 14 Jul 2023 08:45:04 GMT, Aleksey Shipilev wrote: >>> Realized that in production, we would like to see why trimmer might be >>> late. I think this would look even better: >>> [trimnative-shipilev-2.patch](https://github.com/openjdk/jdk/files/12043977/trimnative-shipilev-2.patch) >> >>

Re: RFR: JDK-8293114: JVM should trim the native heap [v12]

2023-07-14 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v11]

2023-07-14 Thread Aleksey Shipilev
On Fri, 14 Jul 2023 09:52:04 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-14 Thread Thomas Stuefe
On Fri, 14 Jul 2023 06:43:15 GMT, David Holmes wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bikeshed Trim log lines > > Test needs a fix for non-Linux. Hi @dholmes-ora, @shipilev, New version: - added the lo

Re: RFR: JDK-8293114: JVM should trim the native heap [v11]

2023-07-14 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-14 Thread Thomas Stuefe
On Fri, 14 Jul 2023 08:45:04 GMT, Aleksey Shipilev wrote: > > > Realized that in production, we would like to see why trimmer might be > > > late. I think this would look even better: > > > [trimnative-shipilev-2.patch](https://github.com/openjdk/jdk/files/12043977/trimnative-shipilev-2.patch)

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-14 Thread Aleksey Shipilev
On Fri, 14 Jul 2023 05:28:15 GMT, Thomas Stuefe wrote: > > Realized that in production, we would like to see why trimmer might be > > late. I think this would look even better: > > [trimnative-shipilev-2.patch](https://github.com/openjdk/jdk/files/12043977/trimnative-shipilev-2.patch) > > I th

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-14 Thread David Holmes
On Thu, 13 Jul 2023 18:56:56 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v9]

2023-07-14 Thread Aleksey Shipilev
On Fri, 14 Jul 2023 05:36:28 GMT, Thomas Stuefe wrote: > Idk. Its all solvable, its just code I guess. Maybe for a later RFE? > Integrating the dcmd with periodic trimming may have one pro, that is > preventing customers from shooting themselves in the foot who issue the dcmd > via script and

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread David Holmes
On Thu, 13 Jul 2023 18:56:56 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Thomas Stuefe
On Fri, 14 Jul 2023 05:02:34 GMT, David Holmes wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bikeshed Trim log lines > > test/hotspot/gtest/runtime/test_trim_native.cpp line 44: > >> 42: NativeHeapTrimmer

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Thomas Stuefe
On Fri, 14 Jul 2023 04:47:23 GMT, David Holmes wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bikeshed Trim log lines > > src/hotspot/share/runtime/trimNativeHeap.cpp line 83: > >> 81: >> 82: // in seconds >>

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Thomas Stuefe
On Thu, 13 Jul 2023 18:56:56 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v9]

2023-07-13 Thread Thomas Stuefe
On Thu, 13 Jul 2023 18:51:09 GMT, Aleksey Shipilev wrote: > Want to replace "Native heap trimmer" with "Periodic native heap trimmer" > too? Would be clear that we are suspending only the periodic one. The DCmd > command would still be accepted and acted upon. Thinking about it, maybe we > sho

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Thomas Stuefe
On Thu, 13 Jul 2023 19:55:49 GMT, Aleksey Shipilev wrote: > Realized that in production, we would like to see why trimmer might be late. > I think this would look even better: > [trimnative-shipilev-2.patch](https://github.com/openjdk/jdk/files/12043977/trimnative-shipilev-2.patch) I thought a

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread David Holmes
On Thu, 13 Jul 2023 18:56:56 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Aleksey Shipilev
On Thu, 13 Jul 2023 18:56:56 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v9]

2023-07-13 Thread Aleksey Shipilev
On Thu, 13 Jul 2023 18:08:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Thomas Stuefe
On Thu, 13 Jul 2023 18:02:08 GMT, Aleksey Shipilev wrote: > Yes, the only thing left is to bikeshed the logging statements a little. Okay done. - PR Comment: https://git.openjdk.org/jdk/pull/14781#issuecomment-1634730982

Re: RFR: JDK-8293114: JVM should trim the native heap [v10]

2023-07-13 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Thomas Stuefe
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Aleksey Shipilev
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Thomas Stuefe
On Wed, 12 Jul 2023 08:47:47 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 32 additional >> comm

Re: RFR: JDK-8293114: JVM should trim the native heap [v9]

2023-07-13 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Thomas Stuefe
On Thu, 13 Jul 2023 17:42:28 GMT, Aleksey Shipilev wrote: >> No, since `_num_trims_performed` is the number of trims performed during the >> lifetime of the JVM. It should probably bumped to 64-bit, now that we have >> millisecond intervals. > > Yeah, my patch, see the link above, does it as `u

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Aleksey Shipilev
On Thu, 13 Jul 2023 17:40:47 GMT, Thomas Stuefe wrote: >> src/hotspot/share/runtime/trimNativeHeap.cpp line 47: >> >>> 45: >>> 46: // Statistics >>> 47: unsigned _num_trims_performed; >> >> Sorry for the nit, but this is `uint16_t` too then, for consistency? > > No, since `_num_trims_perfo

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-13 Thread Thomas Stuefe
On Mon, 10 Jul 2023 18:50:15 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 32 additional >> comm

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-12 Thread Aleksey Shipilev
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-12 Thread Aleksey Shipilev
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-10 Thread Thomas Stuefe
On Mon, 10 Jul 2023 14:04:33 GMT, Ashutosh Mehra wrote: >> Thomas Stuefe has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 32 additional >> commit

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-10 Thread Ashutosh Mehra
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> pre

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Thomas Stuefe
On Mon, 10 Jul 2023 13:38:50 GMT, Aleksey Shipilev wrote: >> But then we have a problem for larger trim intervals. Loosing one or >> multiple trim attempts because a safepoint happened to happen hurts if the >> interval is e.g. 5 minutes. >> >> We could either wait for `MIN2(TrimNativeHeapInte

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Thomas Stuefe
On Sat, 8 Jul 2023 08:01:32 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-10 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Aleksey Shipilev
On Mon, 10 Jul 2023 12:27:44 GMT, Thomas Stuefe wrote: >> src/hotspot/share/runtime/trimNativeHeap.cpp line 106: >> >>> 104: ml.wait(wait_ms); >>> 105: } else if (at_or_nearing_safepoint()) { >>> 106: ml.wait(safepoint_poll_ms); >> >> OK, so here is a little pr

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Thomas Stuefe
On Mon, 10 Jul 2023 10:54:11 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add test with 1ms trim interval >> - No need for atomics > > src/hotspot/share/runtime/trimNativeHeap.cpp line

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Thomas Stuefe
On Mon, 10 Jul 2023 10:37:18 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add test with 1ms trim interval >> - No need for atomics > > src/hotspot/share/runtime/globals.hpp line 1990: >

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Thomas Stuefe
On Mon, 10 Jul 2023 11:06:23 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add test with 1ms trim interval >> - No need for atomics > > src/hotspot/share/runtime/trimNativeHeap.cpp line

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 08:01:32 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v7]

2023-07-08 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v6]

2023-07-07 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v5]

2023-07-07 Thread Thomas Stuefe
On Fri, 7 Jul 2023 13:36:22 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Ashutosh Mehra
On Fri, 7 Jul 2023 13:38:34 GMT, Thomas Stuefe wrote: > (just noticed the patch adds +666 lines, bad sign, I should add another line > somewhere). It also deletes 2 lines so that makes it 664 😉 - PR Comment: https://git.openjdk.org/jdk/pull/14781#issuecomment-1625515410

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Thomas Stuefe
On Thu, 6 Jul 2023 15:38:56 GMT, Leo Korinth wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> last cleanups and shade feedback > > The description says `-XX:GCTrimNativeHeapInterval= (defaults to > 60)`, but the c

Re: RFR: JDK-8293114: JVM should trim the native heap [v5]

2023-07-07 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Thomas Stuefe
On Thu, 6 Jul 2023 18:50:45 GMT, Robbin Ehn wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> last cleanups and shade feedback > > src/hotspot/share/runtime/trimNative.cpp line 137: > >> 135: os::size_change_t

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Thomas Stuefe
On Fri, 7 Jul 2023 04:42:53 GMT, David Holmes wrote: > I had an initial look at this. Seems okay in principle. The > naming/terminology needs some updating IMO: "trimNative" doesn't convey > enough information, please use "trimNativeHeap". "trim" for logging tag is > also too non-descript. >

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Thomas Stuefe
On Thu, 6 Jul 2023 19:04:46 GMT, Robbin Ehn wrote: >> src/hotspot/share/runtime/trimNative.cpp line 149: >> >>> 147: return true; >>> 148: } else { >>> 149: log_info(trim)("Trim native heap (no details)"); >> >> Consistency: `Trim native heap: complete, no details`. > > I

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Thomas Stuefe
On Thu, 6 Jul 2023 16:57:56 GMT, Leo Korinth wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> last cleanups and shade feedback > > src/hotspot/share/runtime/trimNative.cpp line 78: > >> 76: static constexpr int

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 16:49:47 GMT, Leo Korinth wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> last cleanups and shade feedback > > src/hotspot/share/runtime/trimNative.cpp line 42: > >> 40: class NativeTrimmerThre

Re: RFR: JDK-8293114: JVM should trim the native heap [v2]

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 15:35:12 GMT, Leo Korinth wrote: >> Thomas Stuefe has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - seconds->ms >> - rename pause, unpause -> suspend, resume >> - fix ChunkPool::needs_cleaning > > src/hotspot/share

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread David Holmes
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Robbin Ehn
On Thu, 6 Jul 2023 16:14:20 GMT, Aleksey Shipilev wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> last cleanups and shade feedback > > src/hotspot/share/runtime/trimNative.cpp line 149: > >> 147: return t

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Robbin Ehn
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Aleksey Shipilev
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Leo Korinth
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Leo Korinth
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Leo Korinth
On Thu, 6 Jul 2023 15:25:03 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap [v2]

2023-07-06 Thread Leo Korinth
On Thu, 6 Jul 2023 13:01:15 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> prev

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 09:20:25 GMT, Johan Sjölen wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> previ

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-06 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v3]

2023-07-06 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap [v2]

2023-07-06 Thread Thomas Stuefe
> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous > discussions [1] and the comment section of 10085. > >

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 12:20:10 GMT, Thomas Stuefe wrote: >> src/hotspot/share/memory/arena.cpp line 105: >> >>> 103: } >>> 104: return true; >>> 105: } >> >> Something seems wrong here? Having only empty pools means that `::prune()` >> is a no-op. > > Thanks for catching this. All test

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 10:58:01 GMT, Johan Sjölen wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >> previ

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Johan Sjölen
On Thu, 6 Jul 2023 06:54:22 GMT, Thomas Stuefe wrote: > This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous >

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Aleksey Shipilev
On Thu, 6 Jul 2023 10:47:25 GMT, Thomas Stuefe wrote: > About Pause in all VM ops, an alternative would be to just check in the > trimmer if we are at safepoint, and if yes treat it as pause. I'll see if > that's easier (I'm worried about pulling a mutex or atomic increasing the > pauser varia

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 10:08:03 GMT, Aleksey Shipilev wrote: > I don't think the comments from my yesterday's review were addressed :) There > are some old comments (marked with `(Outdated)`, helpfully), but some are > new. Please take a look at them? Of course, sorry. Seems I missed most of them.

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Aleksey Shipilev
On Thu, 6 Jul 2023 06:54:22 GMT, Thomas Stuefe wrote: > This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous >

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 06:54:22 GMT, Thomas Stuefe wrote: > This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous >

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
On Thu, 6 Jul 2023 09:20:25 GMT, Johan Sjölen wrote: > > And app's malloc load can fluctuate wildly, with temporary spikes and long > > idle periods. > > Are you talking about allocations into native memory that a Java application > does on its own accord and not as a consequence of the JVM do

Re: RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Johan Sjölen
On Thu, 6 Jul 2023 06:54:22 GMT, Thomas Stuefe wrote: > This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed > https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much > comment history and got confusing. For a history of this issue, see previous >

RFR: JDK-8293114: JVM should trim the native heap

2023-07-06 Thread Thomas Stuefe
This is a continuation of https://github.com/openjdk/jdk/pull/10085. I closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated too much comment history and got confusing. For a history of this issue, see previous discussions [1] and the comment section of 10085. ---