Linux-HyperV Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1] hv_balloon: disable warning when floor reached
@ 2020-10-08  7:12 Olaf Hering
  2020-10-08  7:15 ` Olaf Hering
  2020-10-19  3:02 ` Michael Kelley
  0 siblings, 2 replies; 10+ messages in thread
From: Olaf Hering @ 2020-10-08  7:12 UTC (permalink / raw)
  To: linux-hyperv, linux-kernel
  Cc: Olaf Hering, K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu

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

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 drivers/hv/hv_balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 32e3bc0aa665..0f50295d0214 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -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.");
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-08  7:12 [PATCH v1] hv_balloon: disable warning when floor reached Olaf Hering
@ 2020-10-08  7:15 ` Olaf Hering
  2020-10-13  9:17   ` Wei Liu
  2020-10-19  3:02 ` Michael Kelley
  1 sibling, 1 reply; 10+ messages in thread
From: Olaf Hering @ 2020-10-08  7:15 UTC (permalink / raw)
  To: linux-hyperv, linux-kernel
  Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu


[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

Am Thu,  8 Oct 2020 09:12:15 +0200
schrieb Olaf Hering <olaf@aepfle.de>:

> warning is logged in dmesg

Actually it is logged on the system console, depending on how logging is configured.


Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-08  7:15 ` Olaf Hering
@ 2020-10-13  9:17   ` Wei Liu
  2020-10-13  9:19     ` Olaf Hering
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Liu @ 2020-10-13  9:17 UTC (permalink / raw)
  To: Olaf Hering
  Cc: linux-hyperv, linux-kernel, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Wei Liu

On Thu, Oct 08, 2020 at 09:15:39AM +0200, Olaf Hering wrote:
> Am Thu,  8 Oct 2020 09:12:15 +0200
> schrieb Olaf Hering <olaf@aepfle.de>:
> 
> > 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.

> 
> Olaf



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-13  9:17   ` Wei Liu
@ 2020-10-13  9:19     ` Olaf Hering
  2020-10-13  9:40       ` Wei Liu
  2020-10-13 11:55       ` Olaf Hering
  0 siblings, 2 replies; 10+ messages in thread
From: Olaf Hering @ 2020-10-13  9:19 UTC (permalink / raw)
  To: Wei Liu
  Cc: linux-hyperv, linux-kernel, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger


[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

Am Tue, 13 Oct 2020 09:17:17 +0000
schrieb Wei Liu <wei.liu@kernel.org>:

> 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

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-13  9:19     ` Olaf Hering
@ 2020-10-13  9:40       ` Wei Liu
  2020-10-19  2:58         ` Michael Kelley
  2020-10-13 11:55       ` Olaf Hering
  1 sibling, 1 reply; 10+ messages in thread
From: Wei Liu @ 2020-10-13  9:40 UTC (permalink / raw)
  To: Olaf Hering
  Cc: Wei Liu, linux-hyperv, linux-kernel, K. Y. Srinivasan,
	Haiyang Zhang, Stephen Hemminger

On Tue, Oct 13, 2020 at 11:19:21AM +0200, Olaf Hering wrote:
> Am Tue, 13 Oct 2020 09:17:17 +0000
> schrieb Wei Liu <wei.liu@kernel.org>:
> 
> > 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.

> 
> Olaf



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-13  9:19     ` Olaf Hering
  2020-10-13  9:40       ` Wei Liu
@ 2020-10-13 11:55       ` Olaf Hering
  1 sibling, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2020-10-13 11:55 UTC (permalink / raw)
  To: Wei Liu
  Cc: linux-hyperv, linux-kernel, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger


[-- Attachment #1: Type: text/plain, Size: 3287 bytes --]

Am Tue, 13 Oct 2020 11:19:21 +0200
schrieb Olaf Hering <olaf@aepfle.de>:

> 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.

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-13  9:40       ` Wei Liu
@ 2020-10-19  2:58         ` Michael Kelley
  2020-10-19  6:56           ` Olaf Hering
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Kelley @ 2020-10-19  2:58 UTC (permalink / raw)
  To: Wei Liu, Olaf Hering
  Cc: linux-hyperv, linux-kernel, KY Srinivasan, Haiyang Zhang,
	Stephen Hemminger

From: Wei Liu <wei.liu@kernel.org>
> 
> On Tue, Oct 13, 2020 at 11:19:21AM +0200, Olaf Hering wrote:
> > Am Tue, 13 Oct 2020 09:17:17 +0000
> > schrieb Wei Liu <wei.liu@kernel.org>:
> >
> > > 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.
> 

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-08  7:12 [PATCH v1] hv_balloon: disable warning when floor reached Olaf Hering
  2020-10-08  7:15 ` Olaf Hering
@ 2020-10-19  3:02 ` Michael Kelley
  2020-10-19 13:42   ` Wei Liu
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Kelley @ 2020-10-19  3:02 UTC (permalink / raw)
  To: Olaf Hering, linux-hyperv, linux-kernel
  Cc: KY Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu

From: Olaf Hering <olaf@aepfle.de> Sent: Thursday, October 8, 2020 12:12 AM
> 
> It is not an error if a the host requests to balloon down, but the VM

Spurious word "a"

> 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:

Fixes:  b3bb97b8a49f3 ("Drivers: hv: balloon: Add logging for dynamic memory operations")

> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>  drivers/hv/hv_balloon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
> index 32e3bc0aa665..0f50295d0214 100644
> --- a/drivers/hv/hv_balloon.c
> +++ b/drivers/hv/hv_balloon.c
> @@ -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,

Reviewed-by: Michael Kelley <mikelley@microsoft.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-19  2:58         ` Michael Kelley
@ 2020-10-19  6:56           ` Olaf Hering
  0 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2020-10-19  6:56 UTC (permalink / raw)
  To: Michael Kelley
  Cc: Wei Liu, linux-hyperv, linux-kernel, KY Srinivasan,
	Haiyang Zhang, Stephen Hemminger


[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

Am Mon, 19 Oct 2020 02:58:08 +0000
schrieb Michael Kelley <mikelley@microsoft.com>:

> 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

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] hv_balloon: disable warning when floor reached
  2020-10-19  3:02 ` Michael Kelley
@ 2020-10-19 13:42   ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2020-10-19 13:42 UTC (permalink / raw)
  To: Michael Kelley
  Cc: Olaf Hering, linux-hyperv, linux-kernel, KY Srinivasan,
	Haiyang Zhang, Stephen Hemminger, Wei Liu

On Mon, Oct 19, 2020 at 03:02:22AM +0000, Michael Kelley wrote:
> From: Olaf Hering <olaf@aepfle.de> Sent: Thursday, October 8, 2020 12:12 AM
> > 
> > It is not an error if a the host requests to balloon down, but the VM
> 
> Spurious word "a"
> 
> > 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:
> 
> Fixes:  b3bb97b8a49f3 ("Drivers: hv: balloon: Add logging for dynamic memory operations")
> 
> > 
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > ---
> >  drivers/hv/hv_balloon.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
> > index 32e3bc0aa665..0f50295d0214 100644
> > --- a/drivers/hv/hv_balloon.c
> > +++ b/drivers/hv/hv_balloon.c
> > @@ -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,
> 
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  7:12 [PATCH v1] hv_balloon: disable warning when floor reached Olaf Hering
2020-10-08  7:15 ` Olaf Hering
2020-10-13  9:17   ` Wei Liu
2020-10-13  9:19     ` Olaf Hering
2020-10-13  9:40       ` Wei Liu
2020-10-19  2:58         ` Michael Kelley
2020-10-19  6:56           ` Olaf Hering
2020-10-13 11:55       ` Olaf Hering
2020-10-19  3:02 ` Michael Kelley
2020-10-19 13:42   ` Wei Liu

Linux-HyperV Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hyperv/0 linux-hyperv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hyperv linux-hyperv/ https://lore.kernel.org/linux-hyperv \
		linux-hyperv@vger.kernel.org
	public-inbox-index linux-hyperv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hyperv


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git