Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-19 Thread Wei Liu
On Mon, Oct 19, 2020 at 03:02:22AM +, Michael Kelley wrote:
> From: Olaf Hering  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 
> > ---
> >  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 

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.


Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-19 Thread Olaf Hering
Am Mon, 19 Oct 2020 02:58:08 +
schrieb Michael Kelley :

> 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


pgpmTOYwUauIW.pgp
Description: Digitale Signatur von OpenPGP


RE: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-18 Thread Michael Kelley
From: Olaf Hering  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 
> ---
>  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 


RE: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-18 Thread Michael Kelley
From: Wei Liu 
> 
> On Tue, Oct 13, 2020 at 11:19:21AM +0200, Olaf Hering wrote:
> > Am Tue, 13 Oct 2020 09:17:17 +
> > schrieb Wei Liu :
> >
> > > 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


Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-13 Thread Olaf Hering
Am Tue, 13 Oct 2020 11:19:21 +0200
schrieb Olaf Hering :

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


pgpd4vHxPdmBv.pgp
Description: Digitale Signatur von OpenPGP


Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-13 Thread Wei Liu
On Tue, Oct 13, 2020 at 11:19:21AM +0200, Olaf Hering wrote:
> Am Tue, 13 Oct 2020 09:17:17 +
> schrieb Wei Liu :
> 
> > 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




Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-13 Thread Olaf Hering
Am Tue, 13 Oct 2020 09:17:17 +
schrieb Wei Liu :

> 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


pgpdCFNj_2sbA.pgp
Description: Digitale Signatur von OpenPGP


Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-13 Thread 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 :
> 
> > 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




Re: [PATCH v1] hv_balloon: disable warning when floor reached

2020-10-08 Thread Olaf Hering
Am Thu,  8 Oct 2020 09:12:15 +0200
schrieb Olaf Hering :

> warning is logged in dmesg

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


Olaf


pgpdjkpjAh1xK.pgp
Description: Digitale Signatur von OpenPGP