RFR: 8321931: memory_swap_current_in_bytes reports 0 as "unlimited" [v4]

Gerard Ziemski gziemski at openjdk.org
Fri Jan 19 17:59:41 UTC 2024


> We make a distinction between 0 for a limit vs non-limit cgroup values.
> 
> For all values (limit or non-limit), 0 simply means 0.
> 
> Output before from `jcmd PID VM.info`:
> 
> 
> container (cgroup) information:
> container_type: cgroupv2
> cpu_cpuset_cpus: not supported
> cpu_memory_nodes: not supported
> active_processor_count: 8
> cpu_quota: not supported
> cpu_period: not supported
> cpu_shares: not supported
> memory_limit_in_bytes: unlimited
> memory_and_swap_limit_in_bytes: unlimited
> memory_soft_limit_in_bytes: unlimited
> memory_usage_in_bytes: 11129120 k
> memory_max_usage_in_bytes: not supported
> memory_swap_current_in_bytes: unlimited
> memory_swap_max_limit_in_bytes: unlimited
> maximum number of tasks: 18963
> current number of tasks: 33
> 
> 
> Output now from `jcmd PID VM.info`:
> 
> 
> container (cgroup) information:
> container_type: cgroupv2
> cpu_cpuset_cpus: not supported
> cpu_memory_nodes: not supported
> active_processor_count: 8
> cpu_quota: not supported
> cpu_period: not supported
> cpu_shares: not supported
> memory_limit_in_bytes: unlimited
> memory_and_swap_limit_in_bytes: unlimited
> memory_soft_limit_in_bytes: unlimited
> memory_usage_in_bytes: 4962584 k
> memory_max_usage_in_bytes: not supported
> memory_swap_current_in_bytes: 0
> memory_swap_max_limit_in_bytes: unlimited
> maximum number of tasks: 18963
> current number of tasks: 33
> 
> In this example `memory_swap_current_in_bytes` should be printed as equal to 0, not "unlimited".

Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:

  add test per jerboaa feedback

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17314/files
  - new: https://git.openjdk.org/jdk/pull/17314/files/0c5c02f7..94da8d90

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

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

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


More information about the hotspot-runtime-dev mailing list