From: Joe Perches <joe@perches.com> To: Michael Kelley <mikelley@microsoft.com>, 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 Subject: Re: [PATCH 1/1] video: hyperv_fb: Add ratelimit on error message Date: Tue, 20 Apr 2021 12:58:48 -0700 [thread overview] Message-ID: <c5de33a3cd1dc18688fc2bb7cf6a84aedcc5a041.camel@perches.com> (raw) In-Reply-To: <1618933459-10585-1-git-send-email-mikelley@microsoft.com> 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 <mikelley@microsoft.com> 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; > }
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com> To: Michael Kelley <mikelley@microsoft.com>, 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 Subject: Re: [PATCH 1/1] video: hyperv_fb: Add ratelimit on error message Date: Tue, 20 Apr 2021 12:58:48 -0700 [thread overview] Message-ID: <c5de33a3cd1dc18688fc2bb7cf6a84aedcc5a041.camel@perches.com> (raw) In-Reply-To: <1618933459-10585-1-git-send-email-mikelley@microsoft.com> 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 <mikelley@microsoft.com> 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; > } _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-04-20 19:58 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-20 15:44 [PATCH 1/1] video: hyperv_fb: Add ratelimit on error message Michael Kelley 2021-04-20 15:44 ` Michael Kelley 2021-04-20 19:48 ` Wei Liu 2021-04-20 19:48 ` Wei Liu 2021-04-20 19:58 ` Joe Perches [this message] 2021-04-20 19:58 ` Joe Perches 2021-04-21 15:27 ` Michael Kelley 2021-04-21 15:27 ` Michael Kelley
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=c5de33a3cd1dc18688fc2bb7cf6a84aedcc5a041.camel@perches.com \ --to=joe@perches.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=haiyangz@microsoft.com \ --cc=kys@microsoft.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-hyperv@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mikelley@microsoft.com \ --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: linkBe 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.