mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jason Low <jason.low2@hp.com>, Ingo Molnar <mingo@kernel.org>,
	Darren Hart <dvhart@linux.intel.com>,
	Mike Galbraith <efault@gmx.de>, Jeff Mahoney <jeffm@suse.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Scott Norton <scott.norton@hp.com>, Tom Vaden <tom.vaden@hp.com>,
	Aswin Chandramouleeswaran <aswin@hp.com>,
	Waiman Long <Waiman.Long@hp.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [RFC patch 0/5] futex: Allow lockless empty check of hashbucket plist in futex_wake()
Date: Mon, 2 Dec 2013 12:01:21 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.02.1312021200100.30673@ionos.tec.linutronix.de> (raw)
In-Reply-To: <1385872653.17749.13.camel@buesod1.americas.hpqcorp.net>

On Sat, 30 Nov 2013, Davidlohr Bueso wrote:
> On Thu, 2013-11-28 at 12:59 +0100, Peter Zijlstra wrote:
> > On Wed, Nov 27, 2013 at 11:44:38PM -0800, Davidlohr Bueso wrote:
> > > How about both enlarging the table _and_ aligning the buckets? As you
> > > know, increasing the size of the table also benefits (particularly in
> > > larger systems) in having more spinlocks. So we reduce the amount of
> > > collisions and alleviate contention on the hb->lock. Btw, do you have
> > > any particular concerns about the larger hash table patch? 
> > 
> > My only concern was the amount of #ifdef.
> > 
> > Wouldn't something like the below also work?
> 
> Below are the results for a workload that stresses the uaddr hashing for
> large amounts of futexes (just make waits fail the uval check, so no
> list handing overhead) on an 80 core, 1Tb NUMA system.
> 
> +---------+--------------------+------------------------+-----------------------+-------------------------------+
> | threads | baseline (ops/sec) | aligned-only (ops/sec) | large table (ops/sec) | large table+aligned (ops/sec) |
> +---------+--------------------+------------------------+-----------------------+-------------------------------+
> |     512 |              32426 | 50531  (+55.8%)        | 255274  (+687.2%)     | 292553  (+802.2%)             |
> |     256 |              65360 | 99588  (+52.3%)        | 443563  (+578.6%)     | 508088  (+677.3%)             |
> |     128 |             125635 | 200075 (+59.2%)        | 742613  (+491.1%)     | 835452  (+564.9%)             |
> |      80 |             193559 | 323425 (+67.1%)        | 1028147 (+431.1%)     | 1130304 (+483.9%)             |
> |      64 |             247667 | 443740 (+79.1%)        | 997300  (+302.6%)     | 1145494 (+362.5%)             |
> |      32 |             628412 | 721401 (+14.7%)        | 965996  (+53.7%)      | 1122115 (+78.5%)              |
> +---------+--------------------+------------------------+-----------------------+-------------------------------+
> 
> Baseline of course sucks compared to any other performance boost, and we
> get the best throughput when applying both optimizations, no surprise.
> We do particularly well for more than 32 threads, and the 'aligned-only'
> column nicely exemplifies the benefits of SMP aligning the buckets
> without considering the reduction in collisions.

Right. So yes, we want both. And I fully agree with Peters dynamic
allocation approach.

Thanks,

	tglx

  reply	other threads:[~2013-12-02 11:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 20:58 Thomas Gleixner
2013-11-25 20:58 ` [RFC patch 1/5] futex: Misc cleanups Thomas Gleixner
2013-11-25 20:58 ` [RFC patch 2/5] futex: Document ordering guarantees Thomas Gleixner
2013-11-25 20:58 ` [RFC patch 3/5] futex: Split out unlock from queue_me() Thomas Gleixner
2013-11-25 20:58 ` [RFC patch 4/5] futex: Enqueue waiter before user space check Thomas Gleixner
2013-11-26  0:20   ` Darren Hart
2013-11-25 20:58 ` [RFC patch 5/5] futex: Allow lockless empty check of hash bucket plist Thomas Gleixner
2013-11-26  8:12 ` [RFC patch 0/5] futex: Allow lockless empty check of hashbucket plist in futex_wake() Davidlohr Bueso
2013-11-26  8:52   ` Peter Zijlstra
2013-11-26 11:21     ` Ingo Molnar
2013-11-26 11:56       ` Peter Zijlstra
2013-11-26 12:34         ` Thomas Gleixner
2013-11-26 15:38           ` Davidlohr Bueso
2013-11-26 14:49         ` Davidlohr Bueso
2013-11-26 19:25     ` Davidlohr Bueso
2013-11-26 20:51       ` Davidlohr Bueso
2013-11-26 23:56         ` Thomas Gleixner
2013-11-28  7:44           ` Davidlohr Bueso
2013-11-28 11:58             ` Thomas Gleixner
2013-11-28 11:59             ` Peter Zijlstra
2013-11-28 14:23               ` Thomas Gleixner
2013-12-01  4:37               ` Davidlohr Bueso
2013-12-02 11:01                 ` Thomas Gleixner [this message]
2013-12-01 12:10               ` Ingo Molnar
2013-12-01 12:56                 ` Peter Zijlstra
2013-12-01 16:55                   ` Ingo Molnar
2013-12-01 18:58                     ` Linus Torvalds
2013-12-01 20:39                       ` Eric Dumazet
2013-12-01 21:46                         ` Linus Torvalds
2013-12-03 17:59                           ` Darren Hart
2013-12-02 12:35                       ` Ingo Molnar

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=alpine.DEB.2.02.1312021200100.30673@ionos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Waiman.Long@hp.com \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=dvhart@linux.intel.com \
    --cc=efault@gmx.de \
    --cc=jason.low2@hp.com \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=scott.norton@hp.com \
    --cc=tom.vaden@hp.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

all inboxes | Powered by JetHome®