public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	"Chen, Tim C" <tim.c.chen@intel.com>,
	"Shi, Alex" <alex.shi@intel.com>
Subject: Re: rcu: performance regression
Date: Tue, 14 Jun 2011 05:43:23 -0700	[thread overview]
Message-ID: <20110614124323.GC2264@linux.vnet.ibm.com> (raw)
In-Reply-To: <1308029185.15392.147.camel@sli10-conroe>

On Tue, Jun 14, 2011 at 01:26:25PM +0800, Shaohua Li wrote:
> Commit a26ac2455ffcf3(rcu: move TREE_RCU from softirq to kthread)
> introduced performance regression. In our AIM7 test, this commit caused
> about 40% regression.
> 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.

Hello, Shaohua,

Could you please try the following patch?  In the meantime, I will
also look over the patch that you sent.

							Thanx, Paul

  parent reply	other threads:[~2011-06-14 12:43 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
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 [this message]
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=20110614124323.GC2264@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=alex.shi@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shaohua.li@intel.com \
    --cc=tim.c.chen@intel.com \
    /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