All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
To: Anssi Hannula <anssi.hannula@bitwise.fi>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] hv_balloon: rate-limit "Unhandled message" warning
Date: Fri, 25 Feb 2022 18:59:18 +0000	[thread overview]
Message-ID: <MN0PR21MB3098049BCEFAAEE5C61F589AD73E9@MN0PR21MB3098.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20220222141400.98160-1-anssi.hannula@bitwise.fi>

From: Anssi Hannula <anssi.hannula@bitwise.fi> Sent: Tuesday, February 22, 2022 6:14 AM
> 
> For a couple of times I have encountered a situation where
> 
>   hv_balloon: Unhandled message: type: 12447
> 
> is being flooded over 1 million times per second with various values,
> filling the log and consuming cycles, making debugging difficult.
> 
> Add rate limiting to the message.
> 
> Most other Hyper-V drivers already have similar rate limiting in their
> message callbacks.
> 
> The cause of the floods in my case was probably fixed by 96d9d1fa5cd5
> ("Drivers: hv: balloon: account for vmbus packet header in
> max_pkt_size").
> 
> Fixes: 9aa8b50b2b3d ("Drivers: hv: Add Hyper-V balloon driver")
> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
> ---
>  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 f2d05bff4245..439f99b8b5de 100644
> --- a/drivers/hv/hv_balloon.c
> +++ b/drivers/hv/hv_balloon.c
> @@ -1563,7 +1563,7 @@ static void balloon_onchannelcallback(void *context)
>                         break;
> 
>                 default:
> -                       pr_warn("Unhandled message: type: %d\n", dm_hdr->type);
> +                       pr_warn_ratelimited("Unhandled message: type: %d\n", dm_hdr->type);
> 
>                 }
>         }
> --
> 2.34.1

Unlike some of the other VMbus drivers, this driver has not been "hardened" for
use in an environment where the guest does not trust the hypervisor, but it was
affected by changes to the underlying ring buffer handling.  The bug that caused
the flood of errors has indeed been fixed, but I'm good with rate limiting this
warning.

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




  reply	other threads:[~2022-02-25 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 14:14 [PATCH] hv_balloon: rate-limit "Unhandled message" warning Anssi Hannula
2022-02-25 18:59 ` Michael Kelley (LINUX) [this message]
2022-03-01 15:16   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN0PR21MB3098049BCEFAAEE5C61F589AD73E9@MN0PR21MB3098.namprd21.prod.outlook.com \
    --to=mikelley@microsoft.com \
    --cc=anssi.hannula@bitwise.fi \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.