* msleep_interruptible() sleeps *way* too long on PowerPC
@ 2012-10-01 17:35 vomlehn
2012-10-01 23:45 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: vomlehn @ 2012-10-01 17:35 UTC (permalink / raw)
To: linux-rt-users
When I run a command from the Busybox shell (ash), I sometimes experience a
very long delay, on a system with the RT patches enabled (fully-preempible),
before the prompt appears. Busybox calls tcdrain() prior to printing the
prompt, which eventually winds up in uart_wait_until_sent(). This function
uses msleep_interruptible() to wait for a millisecond, but doesn't actually
complete for many seconds, even minutes, on an otherwise idle system.
when I change the preemption model to low-latency desktop, the system behaves
as I would expect it to. It's worth mentioning that this is on a PowerPC
processor, which handles timer interrupts through a slightly different path
than other interrupts, but I don't see an issue with this yet.
Another observation which seems pretty vital--if I send a ping packet to one
of the network interfaces, the msleep_interruptible() completes. It is as
though it queued the timer and didn't realize it while timer interrupts were
happening (lost in softIRQ processing?). Then, when the network interrupt
happened, it went through some queue and processed the timeout.
I've verified that the struct timer_list is added and it looks to be in the
right place.
There is an IPI-related PowerPC patch that went into 3.2.30 that sounded a lot
like this, commit 241ee90a69ede9cf9255df1a18036210beeb8adf, but our
configuration doesn't use this and it appears as though this happens when the
task queueing the timer is still on the same processor when it gets the
wakeup. Thus IPIs don't appear to be an issue.
Any thoughts would be appreciated!
--
David VL
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: msleep_interruptible() sleeps *way* too long on PowerPC
2012-10-01 17:35 msleep_interruptible() sleeps *way* too long on PowerPC vomlehn
@ 2012-10-01 23:45 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2012-10-01 23:45 UTC (permalink / raw)
To: vomlehn; +Cc: linux-rt-users, Thomas Gleixner
On Mon, 2012-10-01 at 12:35 -0500, vomlehn@texas.net wrote:
> When I run a command from the Busybox shell (ash), I sometimes experience a
> very long delay, on a system with the RT patches enabled (fully-preempible),
> before the prompt appears. Busybox calls tcdrain() prior to printing the
> prompt, which eventually winds up in uart_wait_until_sent(). This function
> uses msleep_interruptible() to wait for a millisecond, but doesn't actually
> complete for many seconds, even minutes, on an otherwise idle system.
>
> when I change the preemption model to low-latency desktop, the system behaves
> as I would expect it to. It's worth mentioning that this is on a PowerPC
> processor, which handles timer interrupts through a slightly different path
> than other interrupts, but I don't see an issue with this yet.
>
> Another observation which seems pretty vital--if I send a ping packet to one
> of the network interfaces, the msleep_interruptible() completes. It is as
> though it queued the timer and didn't realize it while timer interrupts were
> happening (lost in softIRQ processing?). Then, when the network interrupt
> happened, it went through some queue and processed the timeout.
>
> I've verified that the struct timer_list is added and it looks to be in the
> right place.
>
> There is an IPI-related PowerPC patch that went into 3.2.30 that sounded a lot
> like this, commit 241ee90a69ede9cf9255df1a18036210beeb8adf, but our
> configuration doesn't use this and it appears as though this happens when the
> task queueing the timer is still on the same processor when it gets the
> wakeup. Thus IPIs don't appear to be an issue.
>
> Any thoughts would be appreciated!
Have you tried running a trace on it? Something like:
# mkdir /debug
# mount -t debugfs nodev /debug
# cd /debug/tracing
# echo 1 > events/enable
# <cause the problem>
# <trigger interrupt>
# echo 0 > tracing_on
# cat trace
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-01 23:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 17:35 msleep_interruptible() sleeps *way* too long on PowerPC vomlehn
2012-10-01 23:45 ` Steven Rostedt
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).