From: Steven Rostedt <rostedt@goodmis.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Thomas Gleixner <tglx@linutronix.de>,
Ming Lei <ming.lei@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
USB list <linux-usb@vger.kernel.org>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: usb: don't offload isochronous urb completions to ksoftirq
Date: Wed, 13 Jun 2018 18:31:45 -0400 [thread overview]
Message-ID: <20180613183145.17564d82@gandalf.local.home> (raw)
On Wed, 13 Jun 2018 15:30:31 -0400 (EDT)
Mikulas Patocka <mpatocka@redhat.com> wrote:
> On Wed, 13 Jun 2018, Alan Stern wrote:
>
> > [Steve: Sorry for dumping you into the middle of this discussion.
> > Please see especially the last two paragraphs below. Mikulas is
> > getting dropouts with USB audio because part of the processing uses a
> > tasklet.]
>
> The problem is this:
>
> I have a single core machine with a usb2 sound card. When I increase the
> priority of a music player, the audio starts skipping.
>
> The reason for the skipping is that the ehci usb driver is offloading urb
> callbacks using tasklet_hi_schedule, the callbacks end up being offloaded
> to the ksoftirqd thread (that has priority 0), the music player with
> elevated priority preempts ksoftirqd and causes delays in the urb
> callbacks.
>
> Is this some deficiency in the softirq subsystem? (should we perhaps treat
> tasklet_hi specially and not offload it as much as the others?) Or should
> the ehci driver be fixed not to use tasklets?
>
What we do for softirqs in the RT patch is to have whoever raised the
softirq run the softirq. If local_bh_disabled() is active (bh is
disabled) then a bit is set in the current task struct, where when
local_bh_enable() is called, it will then execute the softirqs that it
raised while bh was disabled.
Perhaps try out the PREEMPT_RT patch and see if the problem goes away.
Hopefully this softirq work may make it into the kernel soon. We could
even enabled it without full PREEMPT_RT.
https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.16/patch-4.16.12-rt5.patch.xz
-- Steve
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-06-13 22:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 22:31 Steven Rostedt [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-15 21:13 usb: don't offload isochronous urb completions to ksoftirq Steven Rostedt
2018-06-15 21:05 Mikulas Patocka
2018-06-15 20:54 Alan Stern
2018-06-15 17:40 Sebastian Andrzej Siewior
2018-06-15 17:34 Steven Rostedt
2018-06-15 17:28 Thomas Gleixner
2018-06-15 17:17 Alan Stern
2018-06-15 16:46 Steven Rostedt
2018-06-15 16:41 Mikulas Patocka
2018-06-14 22:35 Steven Rostedt
2018-06-14 22:23 Mikulas Patocka
2018-06-13 19:30 Mikulas Patocka
2018-06-13 18:54 Alan Stern
2018-06-13 16:35 Mikulas Patocka
2018-06-13 14:13 Alan Stern
2018-06-13 13:57 Mikulas Patocka
2018-06-12 20:06 Alan Stern
2018-06-12 19:03 Mikulas Patocka
2018-06-12 18:50 Mikulas Patocka
2018-06-12 18:44 Alan Stern
2018-06-12 17:52 Greg Kroah-Hartman
2018-06-12 17:19 Mikulas Patocka
2018-06-12 16:38 Alan Stern
2018-06-12 16:03 Mikulas Patocka
2018-06-12 15:11 Alan Stern
2018-06-12 14:44 Mikulas Patocka
2018-06-12 14:38 Alan Stern
2018-06-12 14:29 Mikulas Patocka
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=20180613183145.17564d82@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=mpatocka@redhat.com \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).