Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631549

Re: TREE_SRCU slows hotplug by factor ~16

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: TREE_SRCU slows hotplug by factor ~16
Date 2017-04-26 17:50 +0200
Message-ID <tAxmy-4e9-27@gated-at.bofh.it> (permalink)
References (4 earlier) <tzGLg-45f-11@gated-at.bofh.it> <tzP2a-Rd-7@gated-at.bofh.it> <tAhhL-2cM-11@gated-at.bofh.it> <tAwgO-3vw-15@gated-at.bofh.it> <tAx3d-46S-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 00:40 +0200
  Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 16:40 +0200
    Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-26 17:30 +0200
      Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 17:50 +0200
        Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-26 18:00 +0200
          Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 18:10 +0200
          Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-26 19:50 +0200
            Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 20:00 +0200
              Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-26 20:20 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 20:30 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-27 05:50 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-27 06:20 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-27 06:20 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-27 07:40 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 Mike Galbraith <efault@gmx.de> - 2017-04-27 07:50 +0200
                Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-27 14:40 +0200
            Re: TREE_SRCU slows hotplug by factor ~16 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 20:00 +0200

csiph-web