RFR: 8333522: JFR SwapSpace event might read wrong free swap space size [v3]
Severin Gehwolf
sgehwolf at openjdk.org
Fri Jun 7 11:59:14 UTC 2024
On Fri, 7 Jun 2024 09:41:33 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> In some cgroups v2 based test system , a too large free swap space value has been observed.
>> The value should not be larger than total swap space.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> semicolon missing
LGTM. Consider adding the comment.
src/hotspot/os/linux/os_linux.cpp line 317:
> 315:
> 316: jlong os::free_swap_space() {
> 317: jlong host_free_swap_val = MIN2(os::total_swap_space(), host_free_swap());
Thinking some more about this, it probably warrants a comment. Something like:
// os::total_swap_space() might return the containerized limit which might be
// less than host_free_swap(). The upper bound of free swap needs to be the lower of the two.
-------------
Marked as reviewed by sgehwolf (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19574#pullrequestreview-2104364040
PR Review Comment: https://git.openjdk.org/jdk/pull/19574#discussion_r1631095357
More information about the hotspot-runtime-dev
mailing list