From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Shaohua Li <shaohua.li@intel.com>,
lkml <linux-kernel@vger.kernel.org>,
"Chen, Tim C" <tim.c.chen@intel.com>,
"Shi, Alex" <alex.shi@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: rcu: performance regression
Date: Tue, 14 Jun 2011 05:56:12 -0700 [thread overview]
Message-ID: <20110614125612.GE2264@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110614081315.GE29900@elte.hu>
On Tue, Jun 14, 2011 at 10:13:15AM +0200, Ingo Molnar wrote:
>
> * Shaohua Li <shaohua.li@intel.com> wrote:
>
> > Commit a26ac2455ffcf3(rcu: move TREE_RCU from softirq to kthread)
> > introduced performance regression. In our AIM7 test, this commit caused
> > about 40% regression.
>
> Sigh, this commit is somewhat of a train-wreck.
>
> > The commit runs rcu callbacks in a kthread instead of softirq. We
> > observed high rate of context switch which is caused by this. Out
> > test system has 64 CPUs and HZ is 1000, so we saw more than 64k
> > context switch per second which is caused by the rcu thread.
> >
> > I also did trace and found when rcy thread is woken up, most time
> > the thread doesn't handle any callbacks actually, it just
> > initializes new gp or end one gp or similar.
> >
> > From my understanding, the purpose to make rcu runs in kthread is
> > to speed up rcu callbacks run (with help of rtmutex PI), not for
> > end gp and so on, which runs pretty fast actually and doesn't need
> > boost. To verify my findings, I had below debug patch applied. It
> > still handles rcu callbacks in kthread if there is any pending
> > callbacks, but other things are still running in softirq. this
> > completely solved our regression. I thought this can still boost
> > callbacks run. but I'm not expert in the area, so please help.
> >
> > Thanks,
> > Shaohua
> > ---
> > Documentation/filesystems/proc.txt | 1 +
> > include/linux/interrupt.h | 1 +
> > include/trace/events/irq.h | 3 ++-
> > kernel/rcutree.c | 23 +++++++++++++++++++----
> > kernel/rcutree.h | 1 +
> > kernel/rcutree_plugin.h | 9 +++++++++
> > kernel/softirq.c | 2 +-
> > tools/perf/util/trace-event-parse.c | 1 +
> > 8 files changed, 35 insertions(+), 6 deletions(-)
>
> Paul? Unless this patch is the obviously correct solution everyone
> wants to have, the other obviously correct solution is to do the
> revert ...
I will look Shaohua's patch over. Of course, given that mid-90s
could do well in excess of 100,000 context switches per second
per CPU, I am having a hard time seeing how 1,000 context switches
per second per CPU is by itself resulting in a 40% regression.
Nevertheless, fewer context switches per second should speed things
up, and so again, I will look at Shaohua's patch.
Thanx, Paul
next prev parent reply other threads:[~2011-06-14 12:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 5:26 rcu: performance regression Shaohua Li
2011-06-14 8:13 ` Ingo Molnar
2011-06-14 12:56 ` Paul E. McKenney [this message]
2011-06-14 8:33 ` Alex,Shi
2011-06-14 11:37 ` Alex,Shi
2011-06-14 13:02 ` Paul E. McKenney
2011-06-14 13:07 ` Shi, Alex
2011-06-14 13:14 ` Peter Zijlstra
2011-06-14 13:18 ` Peter Zijlstra
2011-06-14 15:01 ` Paul E. McKenney
2011-06-14 15:10 ` Peter Zijlstra
2011-06-14 15:32 ` Paul E. McKenney
2011-06-14 12:43 ` Paul E. McKenney
2011-06-14 16:48 ` Paul E. McKenney
2011-06-14 20:50 ` Paul E. McKenney
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=20110614125612.GE2264@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=alex.shi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@intel.com \
--cc=torvalds@linux-foundation.org \
/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