From: Wolfgang Grandegger <wg@grandegger.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Wolfgang Grandegger <wg@grandegger.com>,
Luotao Fu <l.fu@pengutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
RT <linux-rt-users@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: 2.6.24-rc8-rt1: Strange latencies on mpc5200 powerpc - RCU issue?
Date: Tue, 01 Jul 2008 16:27:07 +0200 [thread overview]
Message-ID: <486A3EBB.6030905@grandegger.com> (raw)
In-Reply-To: <20080130111559.GC20089@pengutronix.de>
Hi,
I continue this thread because it's still not understood why enabling
CONFIG_RCU_TRACE is necessary to get reasonable latencies on the
MPC5200. It might also explain, why I get much worse latencies with
2.6.25.8-rt7.
Luotao Fu wrote:
> Hi,
>
> On Wed, Jan 30, 2008 at 02:57:16AM -0800, Paul E. McKenney wrote:
> ......
>>> Yes, I used "$ cyclictest -n -t1 -p80 -i1000" to measure the latency. So
>>> far, I have not done other tests. Any recommendation?
>>> As no-rt load I used "while ls; do ls /bin; done" in one telnet window
>>> and "while ./hackbench 10; do ./calibrator 400 32M cali; sleep 30; done"
>>> in another. But already "while ls; do ls /bin; done" is enough to
>>> trigger the high latencies quickly. Note also, that I work on a root
>>> files-ystem mounted via NFS resulting in a lot of network traffic and
>>> utilization.
>> I have to ask...
>>
>> Did you see large latencies when -not- running on NFS?
>>
>
> I cannot speak for Wolfgang but I myself did not get extraordinary high
> latencies running tests on system booted from flash. Neither I could produce
> high latencies on nfs booted system. If my non-rt workload doesn't do heavy
> filesystem/network accesses. i.E. running only hackbench. Hence we were
> wondering if the problem is caused by rcu's in network layer or nfs
> implementation.
To recapitulate, with CONFIG_RCU_TRACE enabled, cyclictest reports max.
latencies of approx. 130 us with 2.6.24.4-rt4 on my MPC5200 PowerPC
board. If I disable it, the latency goes up to 600 us. Obviously, the
trace_mark() calls in rcupreempt*.c have some positive impact on the
latency. I narrowed down, that the 2 calls in __rcu_preempt_boost() in
rcupreempt-boost.c are the important one:
void __rcu_preempt_unboost(void)
{
struct task_struct *curr = current;
struct rcu_boost_dat *rbd;
int prio;
unsigned long flags;
trace_mark(unboost_called, "NULL");
/* if not boosted, then ignore */
if (likely(!rcu_is_boosted(curr)))
return;
/*
* Need to be very careful with NMIs.
* If we take the lock and an NMI comes in
* and it may try to unboost us if curr->rcub_rbdp
* is still set. So we zero it before grabbing the lock.
* But this also means that we might be boosted again
* so the boosting code needs to be aware of this.
*/
rbd = curr->rcub_rbdp;
curr->rcub_rbdp = NULL;
/*
* Now an NMI might have came in after we grab
* the below lock. This check makes sure that
* the NMI doesn't try grabbing the lock
* while we already have it.
*/
if (unlikely(!rbd))
return;
spin_lock_irqsave(&rbd->rbs_lock, flags);
/*
* It is still possible that an NMI came in
* between the "is_boosted" check and setting
* the rcu_rbdp to NULL. This would mean that
* the NMI already dequeued us.
*/
if (unlikely(!rcu_is_boosted(curr)))
goto out;
list_del_init(&curr->rcub_entry);
trace_mark(unboosted, "NULL");
curr->rcu_prio = MAX_PRIO;
spin_lock(&curr->pi_lock);
prio = rt_mutex_getprio(curr);
task_setprio(curr, prio);
curr->rcub_rbdp = NULL;
spin_unlock(&curr->pi_lock);
out:
spin_unlock_irqrestore(&rbd->rbs_lock, flags);
}
With them and all other trace_mark() calls commented out, the latency is
still OK. The first one has a bigger impact.
In 2.6.25.8-rt7, trace_mark() is not used any more but a function
incrementing the corresponding counter directly and I suspect that's the
reason why I'm seeing high latencies with both, CONFIG_RCU_TRACE enabled
and disabled.
I hope this observation sheds some light on the issue.
Wolfgang.
next prev parent reply other threads:[~2008-07-01 14:26 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 4:27 2.6.24-rc8-rt1 Steven Rostedt
2008-01-17 5:26 ` 2.6.24-rc8-rt1 Mark Knecht
2008-01-17 10:13 ` 2.6.24-rc8-rt1 Wolfgang Grandegger
2008-01-17 12:46 ` 2.6.24-rc8-rt1 Luotao Fu
2008-01-17 16:17 ` 2.6.24-rc8-rt1 Daniel Walker
2008-01-17 18:17 ` 2.6.24-rc8-rt1 Wolfgang Grandegger
2008-01-17 18:30 ` 2.6.24-rc8-rt1 Daniel Walker
2008-01-17 18:44 ` 2.6.24-rc8-rt1 Steven Rostedt
2008-01-17 18:45 ` 2.6.24-rc8-rt1 Steven Rostedt
2008-01-17 20:01 ` 2.6.24-rc8-rt1 Wolfgang Grandegger
2008-01-17 18:46 ` 2.6.24-rc8-rt1 Wolfgang Grandegger
2008-01-17 21:11 ` 2.6.24-rc8-rt1 Robert Schwebel
2008-01-17 21:36 ` 2.6.24-rc8-rt1 Wolfgang Grandegger
2008-01-23 14:53 ` 2.6.24-rc8-rt1: Strange latencies on mpc5200 powerpc Luotao Fu
2008-01-23 15:50 ` Daniel Walker
2008-01-23 16:36 ` Wolfgang Grandegger
2008-01-24 10:53 ` Wolfgang Grandegger
2008-01-28 15:11 ` Luotao Fu
2008-01-28 15:38 ` Wolfgang Grandegger
2008-01-29 12:13 ` 2.6.24-rc8-rt1: Strange latencies on mpc5200 powerpc - RCU issue? Luotao Fu
2008-01-29 13:38 ` Wolfgang Grandegger
2008-01-30 1:07 ` Paul E. McKenney
2008-01-30 8:18 ` Wolfgang Grandegger
2008-01-30 10:22 ` Paul E. McKenney
2008-01-30 10:45 ` Wolfgang Grandegger
2008-01-30 10:57 ` Paul E. McKenney
2008-01-30 11:15 ` Luotao Fu
2008-07-01 14:27 ` Wolfgang Grandegger [this message]
2008-07-01 15:11 ` Steven Rostedt
2008-07-01 16:11 ` Wolfgang Grandegger
2008-07-01 21:11 ` Luotao Fu
2008-07-02 11:03 ` Wolfgang Grandegger
2008-07-06 0:42 ` Steven Rostedt
2008-07-06 9:41 ` Wolfgang Grandegger
2008-07-08 15:08 ` Luotao Fu
2008-07-08 19:43 ` Wolfgang Grandegger
2008-07-09 12:53 ` Luotao Fu
2008-07-09 13:15 ` Wolfgang Grandegger
2008-07-09 14:52 ` Luotao Fu
2008-07-10 7:50 ` Wolfgang Grandegger
2008-08-01 21:09 ` Paul E. McKenney
2008-08-01 21:09 ` Paul E. McKenney
2008-08-05 15:40 ` Wolfgang Grandegger
2008-07-02 8:09 ` Wolfgang Grandegger
2008-07-06 0:39 ` Steven Rostedt
2008-07-06 9:34 ` Wolfgang Grandegger
2008-01-30 11:22 ` Wolfgang Grandegger
2008-01-17 19:57 ` 2.6.24-rc8-rt1 Mariusz Kozlowski
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=486A3EBB.6030905@grandegger.com \
--to=wg@grandegger.com \
--cc=l.fu@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--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
Powered by JetHome