Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp423453pxm; Tue, 22 Feb 2022 13:55:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO26N2jVNDa4LqfksH0p8OXeZJo7X5n6l5QoXjzLCA4QcYqtVKSCT9av/VEptg/tGNA7pH X-Received: by 2002:a63:543:0:b0:374:62b7:8ab0 with SMTP id 64-20020a630543000000b0037462b78ab0mr6142047pgf.384.1645566940485; Tue, 22 Feb 2022 13:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645566940; cv=none; d=google.com; s=arc-20160816; b=RNmdqbNbzDrPwPVyb13Vyda2ywF9+ejNqHxG98bh+ZfqsKVbhaSqR0aFcZ+TamPrK5 0HXzSdlK1KDM8u1o2dF/ACOAlR+CWws9fHiSQcnwOjyhxV8woIXjkMOcnj3MBnuzM5b3 si5PcaVC3+jAqqU2raY8NVhk3OA971GjrWLtsHO6E1JuXFmwGIehHqA253K6Q+JiwK8W saaT8gKI74Yk8kc5eTh1zgxHRAUoXQYHhN/F4RpywqwPAm3iHcB1lNxmkVUqFP2/nCCD 2AngifdlTxXACEpsGYDKPe50xGOnJvg+kaM7vBDay+UUpv+X/GioItE/LpT4CSN/4Yrm lFrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tvUaOHAvBOPxaeMMlwU6/cCA+6u+LEf1Kc5Qr6O4XDk=; b=OAuhbduKxRsfSVdvlodDJExSymai0zYAQ5zrMFJMRbJt+vpv2NrztKC5nnQAaqAsMd usvpYJ7rbK3AnjzkikjcI+jPYSM28IasznKtK1384T2eIyOX0Jc+80udnt4v/bP2igOa +0LodVkhALclzeRu4v2wt9eEmuUiUXSmp/7dgCdeL/um4AMQ20ZB56LSAHk5hhdH0qnt Og/xYspzQKeCB7+VxTuLnZYpP8WyKUXWiW16mvs5Wj5xnr8RReZAY1XsB6jCmQTeL1XS keS2DS/L+5HvwAn2q4F8zaiG4bxgkaT2QkVRE35nSs9DEtuBLIASauCVEcoZgGo12C35 UetA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bitwise.fi Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s69si11880212pfc.67.2022.02.22.13.55.24; Tue, 22 Feb 2022 13:55:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bitwise.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbiBVOWX (ORCPT + 99 others); Tue, 22 Feb 2022 09:22:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232660AbiBVOWV (ORCPT ); Tue, 22 Feb 2022 09:22:21 -0500 X-Greylist: delayed 445 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 22 Feb 2022 06:21:56 PST Received: from mail.bitwise.fi (mail.bitwise.fi [109.204.228.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895FDA278F; Tue, 22 Feb 2022 06:21:56 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.bitwise.fi (Postfix) with ESMTP id 0E72D46001C; Tue, 22 Feb 2022 16:14:30 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at Received: from mail.bitwise.fi ([127.0.0.1]) by localhost (mustetatti.dmz.bitwise.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6HK8W964f5TN; Tue, 22 Feb 2022 16:14:24 +0200 (EET) Received: from localhost.net (fw1.dmz.bitwise.fi [192.168.69.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: anssiha) by mail.bitwise.fi (Postfix) with ESMTPSA id C51B546000C; Tue, 22 Feb 2022 16:14:24 +0200 (EET) From: Anssi Hannula To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hv_balloon: rate-limit "Unhandled message" warning Date: Tue, 22 Feb 2022 16:14:00 +0200 Message-Id: <20220222141400.98160-1-anssi.hannula@bitwise.fi> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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