From patchwork Thu May 6 22:30:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1475264 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 4FbpFH22SJz9sWX; Fri, 7 May 2021 08:30:42 +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 1lemVz-0002NT-0t; Thu, 06 May 2021 22:30:39 +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 1lemVx-0002M2-J2 for kernel-team@lists.ubuntu.com; Thu, 06 May 2021 22:30:37 +0000 Received: from mail-pf1-f198.google.com ([209.85.210.198]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lemVx-0001nS-7G for kernel-team@lists.ubuntu.com; Thu, 06 May 2021 22:30:37 +0000 Received: by mail-pf1-f198.google.com with SMTP id a7-20020a62bd070000b029025434d5ead4so4580877pff.0 for ; Thu, 06 May 2021 15:30:37 -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=E61YBnUCiFugpBsOUeRP+jjHToPc0ne/oHItYjy+6wg=; b=UPhGbndh9pp1q1htk/jNoq6pSXw5winQy6PhBKqglYMpMS7CY1vvKr3E2b1nn4zJlp D2AJBRGP2/XMVM6zdz9AOQCuAp6upn1W69hRZdl9a/0jU77GXQLDkZzpKzAnKr+ROTVe 1h2GOCmHa46xCnYmkxCrSHzznuR0iJh5dxWVa1tV3SP9BCMYhj6RWL9yC8UEwRXNe48q GH9iyyZhZeg0iwC/r/EMv1SJ+J1t63r7GyIFrsaC+247/Bh4n4Joaa4lFd9R2fjONEav 5P4n19ZeNy9+VHJAb6IieR9+fbuiKz8yiB0VweQ/4wMwi72i/wH41rXzxWr6ZRDyolTg C7MQ== X-Gm-Message-State: AOAM532dYRFFjrKNoJarMAmWfbauqnK2O2G5H79SC98mFpN4e1fNSNWo MDPHEYDCRPIQbYqgL7Q+GFpe2c4ShtoqEiO3psz6WpXSSIjU2CT9xqojzi5TjCxPxpvBd9LfZu1 4duf91q2+tX6nbUo5oJUUmQcuW0Ij47pR+C2yloCKgw== X-Received: by 2002:a17:902:8d98:b029:eb:43c2:d294 with SMTP id v24-20020a1709028d98b02900eb43c2d294mr6741289plo.49.1620340235602; Thu, 06 May 2021 15:30:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhF2id6P60rOIVLlqGw5alnXIlMs0/p6DQJqKKsbjCt5JvXovKIKdjOhqJ2c+GyBUl2/4KDA== X-Received: by 2002:a17:902:8d98:b029:eb:43c2:d294 with SMTP id v24-20020a1709028d98b02900eb43c2d294mr6741276plo.49.1620340235399; Thu, 06 May 2021 15:30:35 -0700 (PDT) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id 187sm2976599pff.139.2021.05.06.15.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 15:30:34 -0700 (PDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/3][Bionic:linux] video: hyperv_fb: Add ratelimit on error message Date: Thu, 6 May 2021 16:30:24 -0600 Message-Id: <20210506223026.24197-5-tim.gardner@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210506223026.24197-1-tim.gardner@canonical.com> References: <20210506223026.24197-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 6e680007cf6b0..b63c0d7fd27f2 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -252,7 +252,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; }