From: Kevin Hilman <khilman@deeprootsystems.com>
To: balbi@ti.com, Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>
Cc: Paul Walmsley <paul@pwsan.com>,
Wolfram Sang <w.sang@pengutronix.de>,
Shubhrajyoti Datta <omaplinuxkernel@gmail.com>,
linux-i2c@vger.kernel.org, Ben Dooks <ben-linux@fluff.org>,
linux-omap@vger.kernel.org, Shubhrajyoti D <shubhrajyoti@ti.com>,
linux-arm-kernel@lists.infradead.org
Subject: RT throttling and suspend/resume (was Re: [PATCH] i2c: omap: revert "i2c: omap: switch to threaded IRQ support")
Date: Tue, 16 Oct 2012 14:39:50 -0700 [thread overview]
Message-ID: <87ipaanljt.fsf_-_@deeprootsystems.com> (raw)
In-Reply-To: <20121016133356.GG21801@arwen.pp.htv.fi> (Felipe Balbi's message of "Tue, 16 Oct 2012 16:33:56 +0300")
+ peterz, tglx
Felipe Balbi <balbi@ti.com> writes:
[...]
> The problem I see is that even though we properly return IRQ_WAKE_THREAD
> and wake_up_process() manages to wakeup the IRQ thread (it returns 1),
> the thread is never scheduled. To make things even worse, ouw irq thread
> runs once, but doesn't run on a consecutive call. Here's some (rather
> nasty) debug prints showing the problem:
[...]
>> [ 88.721923] try_to_wake_up 1411
>> [ 88.725189] ===> irq_wake_thread 139: IRQ 72 wake_up_process 0
>> [ 88.731292] [sched_delayed] sched: RT throttling activated
This throttling message is the key one.
With RT throttling activated, the IRQ thread will not be run (it
eventually will be allowed much later on, but by then, the I2C xfers
have timed out.)
As a quick hack, the throttling can be disabled by seeting the
sched_rt_runtime to RUNTIME_INF:
# sysctl -w kernel.sched_rt_runtime_us=-1
and a quick test shows that things go back to working as expected. But
we still need to figure out why the throttling is hapenning...
So I started digging into why the RT runtime was so high, and noticed
that time spent in suspend was being counted as RT runtime!
So spending time in suspend anywhere near sched_rt_runtime (0.95s) will
cause the RT throttling to always be triggered, and thus prevent IRQ
threads from running in the resume path. Ouch.
I think I'm already in over my head in the RT runtime stuff, but
counting the time spent in suspend as RT runtime smells like a bug to
me. no?
Peter? Thomas?
Kevin
next prev parent reply other threads:[~2012-10-16 21:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 1:51 [PATCH] i2c: omap: revert "i2c: omap: switch to threaded IRQ support" Paul Walmsley
2012-10-15 7:16 ` Felipe Balbi
[not found] ` <20121015071657.GA22818-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-15 15:05 ` Paul Walmsley
2012-10-16 12:58 ` Shubhrajyoti Datta
2012-10-16 13:33 ` Felipe Balbi
2012-10-16 13:37 ` Felipe Balbi
2012-10-16 21:39 ` Kevin Hilman [this message]
[not found] ` <87ipaanljt.fsf_-_-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2012-10-17 14:00 ` RT throttling and suspend/resume (was Re: [PATCH] i2c: omap: revert "i2c: omap: switch to threaded IRQ support") Felipe Balbi
2012-10-17 14:35 ` Felipe Balbi
2012-10-17 23:06 ` Kevin Hilman
2012-10-18 5:51 ` Felipe Balbi
[not found] ` <20121018055136.GF11137-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-19 14:00 ` Peter Zijlstra
2012-10-19 16:30 ` Felipe Balbi
2012-10-19 23:28 ` Kevin Hilman
2012-10-19 23:54 ` Kevin Hilman
2012-10-22 9:52 ` Peter Zijlstra
2012-10-22 16:47 ` Kevin Hilman
[not found] ` <87ehkqihdh.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2012-10-23 9:19 ` Russell King - ARM Linux
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=87ipaanljt.fsf_-_@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=balbi@ti.com \
--cc=ben-linux@fluff.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=omaplinuxkernel@gmail.com \
--cc=paul@pwsan.com \
--cc=peterz@infradead.org \
--cc=shubhrajyoti@ti.com \
--cc=tglx@linutronix.de \
--cc=w.sang@pengutronix.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).