From patchwork Thu May 6 20:59:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1475248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FbmDk1JlSz9sVb; Fri, 7 May 2021 07:00:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lel6E-0005xK-MM; Thu, 06 May 2021 20:59:58 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lel6C-0005wt-JT for kernel-team@lists.ubuntu.com; Thu, 06 May 2021 20:59:56 +0000 Received: from mail-pf1-f200.google.com ([209.85.210.200]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lel6C-0003jf-Cf for kernel-team@lists.ubuntu.com; Thu, 06 May 2021 20:59:56 +0000 Received: by mail-pf1-f200.google.com with SMTP id k7-20020aa788c70000b029028ead4f0f50so4427545pff.10 for ; Thu, 06 May 2021 13:59:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=orNtz9IPZ870p3PKPrkRD5mK/3zQWKVsfGWFx72kVFg=; b=CufH3Cgk0H1c4O8YN2kCETOUOg/M25rKGdITHYAqTB+JvnXr7TNwtgAnNg301hBbzE QcczeQevttbNR9EJ53k8UWV5m9bg3NRx9HsVANpGtSpbTBUCjU6N6hEArhJqMcJKRoZR qecOvde5gOXNSCWhIOWv1+8mCCxB/AYKwyU+zcpvUCZY1JsYQ0r6xw61t5sE7491wei3 VvAxxeoAfBTcg4/QzZz0GgAOlb5IE3LPkxLkHkctRErbKlx8KVC7CdVzMn4UP9vsZgkx 6gv5TGWCZ5PmdUkO1UDHR5ogZHTywtUoAyvL123jYzH/bIqqa3fD1Yg35IaYmQlIyQYu kMmQ== X-Gm-Message-State: AOAM531KEVDWQoVuQIlvIosehlIObN/Tb7EuCCc8JjA9gEOngRTEueXk mPDEz+qz5bonOuyGVYKMmixl9IbC64Yf2vJqstcY4ulT8TTgXaJgCc2a82BQ3LJTlZqD2srsqTz c46ZmHxvRxHewiq68jCdmQCIWOJ17YwaCWTKgFyLE5g== X-Received: by 2002:aa7:860e:0:b029:28e:b4a9:297f with SMTP id p14-20020aa7860e0000b029028eb4a9297fmr6775726pfn.46.1620334794831; Thu, 06 May 2021 13:59:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1TzKpAkp8Of4BatuN+OdEwgcXZnxWDW8XQm4Vz0Ot7nWwn4xTbDRljUH0RjNntaIxAEcnZQ== X-Received: by 2002:aa7:860e:0:b029:28e:b4a9:297f with SMTP id p14-20020aa7860e0000b029028eb4a9297fmr6775713pfn.46.1620334794530; Thu, 06 May 2021 13:59:54 -0700 (PDT) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id z62sm2882525pfb.110.2021.05.06.13.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:59:54 -0700 (PDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/3] video: hyperv_fb: Add ratelimit on error message Date: Thu, 6 May 2021 14:59:43 -0600 Message-Id: <20210506205948.16067-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210506205948.16067-1-tim.gardner@canonical.com> References: <20210506205948.16067-1-tim.gardner@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Michael Kelley BugLink: https://bugs.launchpad.net/bugs/1927518 Due to a full ring buffer, the driver may be unable to send updates to the Hyper-V host. But outputing the error message can make the problem worse because console output is also typically written to the frame buffer. As a result, in some circumstances the error message is output continuously. Break the cycle by rate limiting the error message. Also output the error code for additional diagnosability. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1618933459-10585-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu (cherry picked from commit aa5b7d11c7cb87c266d705b237368985e7171958) Signed-off-by: Tim Gardner --- drivers/video/fbdev/hyperv_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index 4dc9077dd2ac..a7e6eea2c4a1 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -308,7 +308,7 @@ static inline int synthvid_send(struct hv_device *hdev, VM_PKT_DATA_INBAND, 0); if (ret) - pr_err("Unable to send packet via vmbus\n"); + pr_err_ratelimited("Unable to send packet via vmbus; error %d\n", ret); return ret; }