hv_balloon: disable warning when floor reached
Subsystems (2)
PATCH 1/1 hv_balloon: disable warning when floor reached
It is not an error if a the host requests to balloon down, but the VM refuses to do so. Without this change a warning is logged in dmesg every five minutes.
Fixes commit b3bb97b8a49f3
--- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hv/hv_balloon.c +1 -1
@@ -1275,7 +1275,7 @@ static void balloon_up(struct work_struct *dummy)/* Refuse to balloon below the floor. */ if (avail_pages < num_pages || avail_pages - num_pages < floor) { -pr_warn ("Balloon request will be partially fulfilled. %s\n" , +pr_info ("Balloon request will be partially fulfilled. %s\n" , avail_pages < num_pages ?"Not enough memory." :"Balloon floor reached." );
Am Thu, 8 Oct 2020 09:12:15 +0200
schrieb Olaf Hering <[email protected]>:
Quoted 1 line
warning is logged in dmesg
Actually it is logged on the system console, depending on how logging is configured.
Olaf
Wei Liu
maintainerQuoted 7 lines · Olaf Hering
Am Thu, 8 Oct 2020 09:12:15 +0200
schrieb Olaf Hering <[email protected]>:Quoted 1 line
warning is logged in dmesg
Actually it is logged on the system console, depending on how logging is configured.
So ... this patch is not needed anymore?
Wei.
Quoted 2 lines
Olaf
Am Tue, 13 Oct 2020 09:17:17 +0000
schrieb Wei Liu <[email protected]>:
Quoted 1 line
So ... this patch is not needed anymore?
Why? A message is generated every 5 minutes. Unclear why this remained unnoticed since at least v5.3. I have added debug to my distro kernel to see what the involved variable values are. More info later today.
Olaf
Wei Liu
maintainerQuoted 8 lines · Olaf Hering
Am Tue, 13 Oct 2020 09:17:17 +0000
schrieb Wei Liu <[email protected]>:Quoted 1 line
So ... this patch is not needed anymore?
Why? A message is generated every 5 minutes. Unclear why this remained unnoticed since at least v5.3. I have added debug to my distro kernel to see what the involved variable values are. More info later today.
What I mean is you seem to have found a way to configure the system to get what you want it to do. It was unclear to me whether this patch is absolutely necessary from your last reply.
Some may consider the log informational (like you), some may think it warrants a warning (because not enough memory). People also don't seem to be particularly bother by it since its introduction in 4.10.
I have no objection to applying this patch. I can pick it up if I don't hear objection in the next couple of days.
Wei.
Quoted 2 lines
Olaf
From: Wei Liu <[email protected]>
Quoted 15 lines · Olaf Hering
Quoted 8 lines
Am Tue, 13 Oct 2020 09:17:17 +0000
schrieb Wei Liu <[email protected]>:Quoted 1 line
So ... this patch is not needed anymore?
Why? A message is generated every 5 minutes. Unclear why this remained unnoticed since at least v5.3. I have added debug to my distro kernel to see what the involved variable values are. More info later today.
What I mean is you seem to have found a way to configure the system to get what you want it to do. It was unclear to me whether this patch is absolutely necessary from your last reply.
Quoted 7 lines
Some may consider the log informational (like you), some may think it warrants a warning (because not enough memory). People also don't seem to be particularly bother by it since its introduction in 4.10.
I have no objection to applying this patch. I can pick it up if I don't hear objection in the next couple of days.
I think we should take the patch. We've had a complaint about the noisy output from another source as well, so it was on my list of small things to clean up. Thanks for doing it Olaf.
I'll send a separate Reviewed-by:
Michael
Am Mon, 19 Oct 2020 02:58:08 +0000
schrieb Michael Kelley <[email protected]>:
Quoted 1 line
I think we should take the patch.
Thanks. I just briefly looked at the code, did not understand much of it. But it feels like the math uses the wrong input. I think its is not the 'pr_warn' that needs changing, the 'Fixes' tag would also be incorrect because a 4.12+backports kernel does not show the warning.
Olaf
Am Tue, 13 Oct 2020 11:19:21 +0200
schrieb Olaf Hering <[email protected]>:
Quoted 1 line
A message is generated every 5 minutes. Unclear why this remained unnoticed since at least v5.3. I have added debug to my distro kernel to see what the involved variable values are. More info later today.
The actual values for avail_pages, num_pages and floor are shown below.
The VM has min 512M, startup 1024M. If I interpret it correctly, the host requests to balloon down 83MB, while the VM has ~596MB assigned according to the GUI. free still reports 878MB.
Olaf
[ 66.917948] hv_balloon: Max. dynamic memory size: 2222 MB [ 331.839393] hv_balloon: Balloon request will be partially fulfilled. (65875 32768 54728) Balloon floor reached. [ 331.847451] hv_balloon: Balloon request will be partially fulfilled. (54745 21621 54728) Balloon floor reached. [ 331.848480] hv_balloon: Balloon request will be partially fulfilled. (54745 21604 54728) Balloon floor reached. [ 331.849465] hv_balloon: Balloon request will be partially fulfilled. (54745 21587 54728) Balloon floor reached. [ 331.850463] hv_balloon: Balloon request will be partially fulfilled. (54745 21570 54728) Balloon floor reached. [ 331.851393] hv_balloon: Balloon request will be partially fulfilled. (54682 21553 54728) Balloon floor reached. [ 631.814538] hv_balloon: Balloon request will be partially fulfilled. (54801 21553 54728) Balloon floor reached. [ 631.819084] hv_balloon: Balloon request will be partially fulfilled. (54801 21480 54728) Balloon floor reached. [ 631.823487] hv_balloon: Balloon request will be partially fulfilled. (54738 21407 54728) Balloon floor reached. [ 631.825832] hv_balloon: Balloon request will be partially fulfilled. (54738 21397 54728) Balloon floor reached. [ 631.827988] hv_balloon: Balloon request will be partially fulfilled. (54738 21387 54728) Balloon floor reached. [ 631.830111] hv_balloon: Balloon request will be partially fulfilled. (54738 21377 54728) Balloon floor reached. [ 931.814649] hv_balloon: Balloon request will be partially fulfilled. (54406 21367 54728) Balloon floor reached. [ 1231.829087] hv_balloon: Balloon request will be partially fulfilled. (54408 21367 54728) Balloon floor reached. [ 1531.859374] hv_balloon: Balloon request will be partially fulfilled. (54416 21367 54728) Balloon floor reached. [ 1831.874813] hv_balloon: Balloon request will be partially fulfilled. (54408 21367 54728) Balloon floor reached. [ 2131.878262] hv_balloon: Balloon request will be partially fulfilled. (54672 21367 54728) Balloon floor reached. [ 2431.895144] hv_balloon: Balloon request will be partially fulfilled. (54532 21367 54728) Balloon floor reached. [ 2731.916792] hv_balloon: Balloon request will be partially fulfilled. (54609 21367 54728) Balloon floor reached. [ 3031.922862] hv_balloon: Balloon request will be partially fulfilled. (54597 21367 54728) Balloon floor reached. [ 3331.949145] hv_balloon: Balloon request will be partially fulfilled. (54615 21367 54728) Balloon floor reached. [ 3631.957564] hv_balloon: Balloon request will be partially fulfilled. (54540 21367 54728) Balloon floor reached. [ 3931.969477] hv_balloon: Balloon request will be partially fulfilled. (53057 21367 54728) Balloon floor reached.
From: Olaf Hering <[email protected]> Sent: Thursday, October 8, 2020 12:12 AM
Quoted 2 lines
It is not an error if a the host requests to balloon down, but the VM
Spurious word "a"
Quoted 4 lines
refuses to do so. Without this change a warning is logged in dmesg every five minutes.
Fixes commit
b3bb97b8a49f3
This "Fixes" line isn't formatted correctly. Should be:
Quoted 11 lines
Signed-off-by Olaf Hering <[email protected]>--- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hv/hv_balloon.c +0
-0
drivers/hv/hv_balloon.c static void balloon_up(struct work_struct *dummy) · line 1281
Quoted 8 lines
drivers/hv/hv_balloon.c +1
-1@@ -1275,7 +1275,7 @@ static void balloon_up(struct work_struct *dummy)/* Refuse to balloon below the floor. */ if (avail_pages < num_pages || avail_pages - num_pages < floor) { -pr_warn ("Balloon request will be partially fulfilled. %s\n" , +pr_info ("Balloon request will be partially fulfilled. %s\n" , avail_pages < num_pages ?"Not enough memory." :"Balloon floor reached." );
Above nits notwithstanding,
Wei Liu
maintainerQuoted 37 lines · Michael Kelley
From: Olaf Hering <[email protected]> Sent: Thursday, October 8, 2020 12:12 AM
Quoted 2 lines
It is not an error if a the host requests to balloon down, but the VM
Spurious word "a"
Quoted 4 lines
refuses to do so. Without this change a warning is logged in dmesg every five minutes.
Fixes commit
b3bb97b8a49f3This "Fixes" line isn't formatted correctly. Should be:
Fixes b3bb97b8a49f3 ("Drivers: hv: balloon: Add logging for dynamic memory operations")Quoted 11 lines
Signed-off-by Olaf Hering <[email protected]>--- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hv/hv_balloon.c +0
-0drivers/hv/hv_balloon.c static void balloon_up(struct work_struct *dummy) · line 1281
Quoted 8 lines
drivers/hv/hv_balloon.c +1
-1@@ -1275,7 +1275,7 @@ static void balloon_up(struct work_struct *dummy)/* Refuse to balloon below the floor. */ if (avail_pages < num_pages || avail_pages - num_pages < floor) { -pr_warn ("Balloon request will be partially fulfilled. %s\n" , +pr_info ("Balloon request will be partially fulfilled. %s\n" , avail_pages < num_pages ?"Not enough memory." :"Balloon floor reached." );Above nits notwithstanding,
Quoted 1 line
Reviewed-by Michael Kelley <[email protected]>
Thanks. I see one for and no against so far.
I've applied this patch to hyperv-fixes. I also fixed those nits while at it.
Wei.