RFR: JDK-8303051: Stop saving 5 chunks in each ChunkPool [v4]

Johan Sjölen jsjolen at openjdk.org
Thu Feb 23 10:51:32 UTC 2023


> In the 4 pre-defined ChunkPools the pruner save 5 chunks for re-use later in the program. The pruner runs every 5 seconds and saves the first 5 chunks that were last freed and put into the pool. In other words: The lifetime of these 5 chunks are indeterminate, we don't know when these will be freed. This is a problem, because these chunks are allocated with os::malloc(). We might be clobbering our underlying malloc's capacity to shrink its own arena sizes because of the placement of these chunks, and it would be very difficult for us to know whether this is the case.
> 
> I suggest that we stop saving these 4*5 chunks and always remove all free chunks when cleaning the pools.
> 
> Passes Arena gtests, running tier1.

Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:

  Forgot to set _first

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/12710/files
  - new: https://git.openjdk.org/jdk/pull/12710/files/5d67452e..46de9d48

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12710&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12710&range=02-03

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/12710.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12710/head:pull/12710

PR: https://git.openjdk.org/jdk/pull/12710


More information about the hotspot-runtime-dev mailing list