Skip to content
Snippets Groups Projects
Commit 04ac707f authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity
Browse files

jvmballoon: fix _soft_max_balloons check


Number of to be released balloons is calculated as a difference between
current number of balloons and sof max. If they are equal no balloons
are released and the loop repeats.

Signed-off-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent c74afb15
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,7 @@ void jvm_balloon_shrinker::_thread_loop() ...@@ -295,7 +295,7 @@ void jvm_balloon_shrinker::_thread_loop()
WITH_LOCK(balloons_lock) { WITH_LOCK(balloons_lock) {
_blocked.wait_until(balloons_lock, [&] { return (_pending.load() + _pending_release.load()) > 0; }); _blocked.wait_until(balloons_lock, [&] { return (_pending.load() + _pending_release.load()) > 0; });
if (balloons.size() >= _soft_max_balloons) { if (balloons.size() > _soft_max_balloons) {
memory::wake_reclaimer(); memory::wake_reclaimer();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment