From: "Leon Woestenberg" <leon.woestenberg@gmail.com>
To: Ingo Molnar <mingo@elte.hu>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Linux-RT Kernel List <linux-rt-users@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Leon Woestenberg <leon@sidebranch.com>,
John Kacur <jkacur@gmail.com>
Subject: Re: [PATCH 2.6.24.7-rt14 v2] rt: {queue,schedule}_work_prio() allowing work priorities other than caller's priority
Date: Wed, 9 Jul 2008 18:11:59 +0200 [thread overview]
Message-ID: <c384c5ea0807090911i790ac4een40633a3721810071@mail.gmail.com> (raw)
In-Reply-To: <486f7032.01b6420a.65e1.6a88@mx.google.com>
Hello,
On Sat, Jul 5, 2008 at 2:59 PM, <leon.woestenberg@gmail.com> wrote:
> The faulty case was a non-FIFO serial driver that deferred LED blinking to
> a workqueue using schedule_work(). However, that work used GPIO bitbanged I2C,
> which uses 50 usecs udelay()s. With the work inheriting the serial IRQ priority,
> it easily missed the ~60 usec deadline of 115200 bps communications.
>
John Kacur asked forthe (custom) code showing this case on IRC.
I suspect the current kernel also has drivers that *also* depend on
workqueue's not pre-empting or delaying their calling interrupt
handler.
See http://www.sidebranch.com/leon/ for the code. A short file roadmap
and explanation of the analysis:
lowlevel_16550.c: non-FIFO UART driver
axonbus.c: protocol handler
max7311.c: I2C -> GPIO extender, driving a few LEDs.
Queueing the "blink a LED" work happens in this code path:
lowlevel_16550.c:axonbus_isr() -> axonbus.c:ab_cmd_receive() ->
boardsupport.c:ll_blink()
The queued work then performs this code path, running at the same
real-time priority as the originating IRQ:
ll_blink_work() -> do_max7311_read() -> i2c-algo-bit.c:* -> udelay(50)
The udelay(50) thus keeps the 16550 interrupt from being serviced.
Scheduling the work at lower priority solved this.
Regards,
Leon.
p.s. we will submit the max7311 driver for upstream.
prev parent reply other threads:[~2008-07-09 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 12:59 [PATCH 2.6.24.7-rt14 v2] rt: {queue,schedule}_work_prio() allowing work priorities other than caller's priority leon.woestenberg
2008-07-09 16:11 ` Leon Woestenberg [this message]
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=c384c5ea0807090911i790ac4een40633a3721810071@mail.gmail.com \
--to=leon.woestenberg@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=jkacur@gmail.com \
--cc=leon@sidebranch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--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).