The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Chris Down <chris@chrisdown.name>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH] usb-audio: Rate limit usb_set_interface error reporting
Date: Fri, 21 Apr 2023 16:42:57 +0200	[thread overview]
Message-ID: <87wn25qosu.wl-tiwai@suse.de> (raw)
In-Reply-To: <ZEKf8UYBYa1h4JWR@chrisdown.name>

On Fri, 21 Apr 2023 16:38:41 +0200,
Chris Down wrote:
> 
> When an error occurs during USB disconnection sometimes things can go
> wrong as endpoint_set_interface may end up being called repeatedly. For
> example:
> 
> % dmesg --notime | grep 'usb 3-7.1.4' | sort | uniq -c | head -2
>    3069 usb 3-7.1.4: 1:1: usb_set_interface failed (-19)
>     908 usb 3-7.1.4: 1:1: usb_set_interface failed (-71)
> 
> In my case, there sometimes are hundreds of these usb_set_interface
> failure messages a second when I disconnect the hub that has my USB
> audio device.
> 
> These messages can take a huge amount of the kmsg ringbuffer and don't
> provide any extra information over the previous ones, so ratelimit them.
> 
> Signed-off-by: Chris Down <chris@chrisdown.name>

This patch itself is safe and good to have, so I'm going to take it as
is.

But I'm still curious in which code path the problem happens.  That
is, we should address such unnecessary repeats if possible.  Do you
have some more data?


thanks,

Takashi

  reply	other threads:[~2023-04-21 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 14:38 [PATCH] usb-audio: Rate limit usb_set_interface error reporting Chris Down
2023-04-21 14:42 ` Takashi Iwai [this message]
2023-04-21 14:48   ` Chris Down
2023-04-21 15:11     ` Takashi Iwai
2023-04-21 15:16       ` Chris Down
2023-04-21 15:37         ` Takashi Iwai

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=87wn25qosu.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=chris@chrisdown.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox