Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp74510pxy; Tue, 20 Apr 2021 13:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyM7Eln0spxII0bhUnzUrUuQ08SbFbn/ZFR15a2rKP1052NutwBN8scKOqSNMiIXy7vaOk X-Received: by 2002:a62:82c8:0:b029:25a:b502:e1aa with SMTP id w191-20020a6282c80000b029025ab502e1aamr7047889pfd.64.1618948827416; Tue, 20 Apr 2021 13:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618948827; cv=none; d=google.com; s=arc-20160816; b=sAjTsTmjtQh7Q/V4Dv8KZrsTWBYfi8MJwrajoHxZsdu5iuNcNHdfii5E9VtZ1B9Oum hOEkSrWG5oEQZx4Q6EfSYRU+yElxM0ra4DKNpHHwV9KpGhNWKJyhoZrbz4iYMDy+ODsr vLRI2BDNk8RlKbVWuDz7p66DVjvb6rs5mlvhkl9hlimwMtsJbNaU+YDrbrM2d+OkkEGl annymO/anzxMUdLL9FKSR+2kt7TRR+8K1tjuoY+OZ+gxQ3gQ1c15OlaB7mBW7wqe7AvG /A9puKdQvvdGw6FuRZqqGJfOfg2HnOIWNHI0oN2UfXgAutLO73eIW9jzfH5iiLizxOcP 8THw== 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 :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=Fyxpe/d6WiXGJUVQPvDjNxP10mcNeKEKzUFPQ3kKpHg=; b=DvMUlKMEjuoYA5mslgErKMp1HNfHZLURunYVs0uIMNe2UWAsrk39EfSbCZnhu91OX7 XGDOvbt47mLB4Gh/8/6RuvJDyIDsWfzSBR2U9NHfPYuJyf33+GK3gIzZaMdUf9zJIry5 lYRvksiSK1SZPYSEGryNnQfoviUaUXzyTlYXKszJsknCCR0kJkBLj3sRqFhdmAjn8a+6 gvnarJUbT2XxyU8YpZ4ZnJpbjpoid2n8TEVaQDf3SC9FO3lWivLW8eXDR6bgj8YA4X0X 6aFiFPf8l/qOuOHJa+12ZzDSYX4NQcj3AcwiKY8YiZMophLBTFaHg5yZAUbYdwWMMHRW Xm2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cp14si23430345plb.386.2021.04.20.13.00.15; Tue, 20 Apr 2021 13:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233785AbhDTT71 (ORCPT + 99 others); Tue, 20 Apr 2021 15:59:27 -0400 Received: from smtprelay0166.hostedemail.com ([216.40.44.166]:35464 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233541AbhDTT7Y (ORCPT ); Tue, 20 Apr 2021 15:59:24 -0400 Received: from omf01.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 6E69C181D3030; Tue, 20 Apr 2021 19:58:51 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA id F010F1727C; Tue, 20 Apr 2021 19:58:49 +0000 (UTC) Message-ID: Subject: Re: [PATCH 1/1] video: hyperv_fb: Add ratelimit on error message From: Joe Perches To: Michael Kelley , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 20 Apr 2021 12:58:48 -0700 In-Reply-To: <1618933459-10585-1-git-send-email-mikelley@microsoft.com> References: <1618933459-10585-1-git-send-email-mikelley@microsoft.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: F010F1727C X-Spam-Status: No, score=0.10 X-Stat-Signature: wp7o7gzq7pg8kxru5xh3thy9zy7qob7b X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19dJn8qDTGT/B7MaqDP5Xqh09MwTqzF5cI= X-HE-Tag: 1618948729-943129 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-04-20 at 08:44 -0700, Michael Kelley wrote: > 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 None of the callers of this function ever check the return status. Why is important/useful to emit this message at all? > --- > ?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 4dc9077..a7e6eea 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; > ?}