linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Mike Galbraith <efault@gmx.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: TREE_SRCU slows hotplug by factor ~16
Date: Wed, 26 Apr 2017 08:44:02 -0700	[thread overview]
Message-ID: <20170426154402.GT3956@linux.vnet.ibm.com> (raw)
In-Reply-To: <1493220380.6176.2.camel@gmx.de>

On Wed, Apr 26, 2017 at 05:26:20PM +0200, Mike Galbraith wrote:
> On Wed, 2017-04-26 at 07:31 -0700, Paul E. McKenney wrote:
> 
> > And a sneak preview, semi-tested.  If you get a chance to run this, please
> > let me know now it goes.
> 
> That took 'time stress-cpu-hotplug.sh' down to 48s, close to classic.

Woo-hoo!!!  ;-)

And thank you for your testing efforts!

Should I be comparing this with the 55s number from your initial email,
or to the 39s number?

Either way, given the unusual nature of Steven's hotplug stress test,
I believe that I am good enough for this merge window.  But if we
are talking 48s for Tree SRCU vs. 39s with Classic SRCU, it would be
good to at least understand where the remaining slowdown is.  Here
are a couple of possible causes:

o	My holdoff is too long.  I set it to 50 microseconds based
	on your trace, which shows a minimum grace-period separation
	of 118 microseconds.  But perhaps the trace was too short to
	show the full variation.  One way to check this is to run with
	srcutree.exp_holdoff=25000 or some such.  (Please note that
	srcutree.exp_holdoff is in nanoseconds, -not- microseconds.)

o	My expedited throttling is too aggressive.  This is controlled
	by the following lines of code in srcu_gp_end() in the file
	kernel/rcu/srcutree.c:

		/* Throttle expedited grace periods: Should be rare! */
		srcu_reschedule(sp, rcu_seq_ctr(gpseq) & 0x3ff
				    ? 0 : SRCU_INTERVAL);

	The "0x3ff" says that one in 1024 grace periods should be
	forced to be at least partially non-expedited, regardless
	of anything else.  If making this be (say) "0xfff" gets
	you three-quarters of the way to the 39s, that indicates
	that this is the controlling factor.

o	Of course, another question is how much variation there is
	in the timing of that stress test.

If further reduction is needed, and none of these help, could you
please send me a trace of the full run of the same form as the last
one you sent me, covering calls to and returns from call_srcu(),
synchronize_srcu(), and synchronize_srcu_expedited()?

							Thanx, paul

  reply	other threads:[~2017-04-26 15:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  2:48 TREE_SRCU slows hotplug by factor ~16 Mike Galbraith
2017-04-24  3:32 ` Paul E. McKenney
2017-04-24  5:24   ` Mike Galbraith
2017-04-24  6:22     ` Paul E. McKenney
2017-04-24  7:35       ` Mike Galbraith
2017-04-24  8:43         ` Mike Galbraith
2017-04-24 16:24         ` Paul E. McKenney
2017-04-25 22:36           ` Paul E. McKenney
2017-04-26 14:31             ` Paul E. McKenney
2017-04-26 15:26               ` Mike Galbraith
2017-04-26 15:44                 ` Paul E. McKenney [this message]
2017-04-26 15:49                   ` Mike Galbraith
2017-04-26 16:00                     ` Paul E. McKenney
2017-04-26 17:45                     ` Mike Galbraith
2017-04-26 17:55                       ` Paul E. McKenney
2017-04-26 17:56                         ` Paul E. McKenney
2017-04-26 18:12                           ` Mike Galbraith
2017-04-26 18:25                             ` Paul E. McKenney
2017-04-27  3:43                             ` Mike Galbraith
2017-04-27  4:11                               ` Paul E. McKenney
2017-04-27  4:15                                 ` Mike Galbraith
2017-04-27  5:32                                   ` Paul E. McKenney
2017-04-27  5:44                                     ` Mike Galbraith
2017-04-27 12:37                                       ` 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=20170426154402.GT3956@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).