RFR: 8321931: memory_swap_current_in_bytes reports 0 as "unlimited" [v4]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Jan 22 14:07:32 UTC 2024
On Fri, 19 Jan 2024 17:56:20 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
> I chose to check that `unlimited` does not appear with `memory_swap_current_in_bytes` on the same line, not for `0` to exist, since it's possible that the current memory swap might be > 0, at some point later in the future.
Why? If a container is being run with `--memory X` and `--memory-swap X` (`X` being the same value) then there must not be any swap used, so any value greater than `0` would be a bug and the assertion is safe. See https://docs.docker.com/config/containers/resource_constraints/#prevent-a-container-from-using-swap
I agree, though, that it might be better to move to a separate test. Up to you.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17314#issuecomment-1904072499
More information about the hotspot-runtime-dev
mailing list