RFR: 8321931: memory_swap_current_in_bytes reports 0 as "unlimited"

Gerard Ziemski gziemski at openjdk.org
Thu Jan 18 16:14:16 UTC 2024


On Wed, 17 Jan 2024 13:14:54 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> The bug is a bit thin on the details. Can that be improved? I'm not aware that any of the APIs in hotspot return 0 for `unlimited`. If it is, it's a bug. It would be good to have this captured in a test somewhere. Would a test with `--memory 200M --memory-swap=200M` (no swap), trigger the said case? I think it would. For cg v1 the test case would probably also need a swappiness value of `0`.

Actually hotspot is doing the opposite: it returns "unlimited" when it was supposed to return "0". You can see it right now if you run "jcmd PID VM.info" and look at "memory_swap_current_in_bytes". No special flags needed to see this.

Thank you for taking a look. I also agree that we should treat "0" as "0" for all cases.

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

PR Comment: https://git.openjdk.org/jdk/pull/17314#issuecomment-1898783729


More information about the hotspot-runtime-dev mailing list