From: Waiman Long <longman@redhat.com>
To: valdis.kletnieks@vt.edu
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Mike Galbraith <umgwanakikbuti@gmail.com>,
Scott J Norton <scott.norton@hpe.com>
Subject: Re: [PATCH-tip v5 17/21] TP-futex: Group readers together in wait queue
Date: Fri, 3 Feb 2017 13:42:46 -0500 [thread overview]
Message-ID: <275d5112-eaa8-1158-b26d-4e18c8bf79e1@redhat.com> (raw)
In-Reply-To: <13281.1486146235@turing-police.cc.vt.edu>
On 02/03/2017 01:23 PM, valdis.kletnieks@vt.edu wrote:
> On Fri, 03 Feb 2017 13:03:50 -0500, Waiman Long said:
>
>> On a 2-socket 36-core E5-2699 v3 system (HT off) running on a 4.10
>> WW futex TP futex Glibc
>> -------- -------- -----
>> Total locking ops 35,707,234 58,645,434 10,930,422
>> Per-thread avg/sec 99,149 162,887 30,362
>> Per-thread min/sec 93,190 38,641 29,872
>> Per-thread max/sec 104,213 225,983 30,708
> Do we understand where the 38K number came from? I'm a bit concerned that the
> min-to-max has such a large dispersion compared to all the other numbers. Was
> that a worst-case issue, and is the worst-case something likely to happen in
> production, or requires special effort to trigger?
>
Because the lock isn't fair and depending on the placement of the lock,
you will see some CPUs have higher likelihood of getting the lock than
the others. This is reflected in the different locking rates as reported
by the micro-benchmark. As the microbenchmark is included in this patch
set, you can play around with it if you want.
This patch set does guarantee some minimum performance level, but it
can't guarantee fairness for all the lock waiters.
Regards,
Longman
next prev parent reply other threads:[~2017-02-03 18:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 18:03 [PATCH-tip v5 00/21] futex: Introducing throughput-optimized (TP) futexes Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 01/21] perf bench: New microbenchmark for userspace mutex performance Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 02/21] perf bench: New microbenchmark for userspace rwlock performance Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 03/21] futex: Consolidate duplicated timer setup code Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 04/21] futex: Rename futex_pi_state to futex_state Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 05/21] futex: Add helpers to get & cmpxchg futex value without lock Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 06/21] futex: Consolidate pure pi_state_list add & delete codes to helpers Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 07/21] futex: Add a new futex type field into futex_state Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 08/21] futex: Allow direct attachment of futex_state objects to hash bucket Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 09/21] futex: Introduce throughput-optimized (TP) futexes Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 10/21] TP-futex: Enable robust handling Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 11/21] TP-futex: Implement lock handoff to prevent lock starvation Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 12/21] TP-futex: Return status code on FUTEX_LOCK calls Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 13/21] TP-futex: Add timeout support Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 14/21] TP-futex, doc: Add TP futexes documentation Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 15/21] TP-futex: Support userspace reader/writer locks Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 16/21] TP-futex: Enable kernel reader lock stealing Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 17/21] TP-futex: Group readers together in wait queue Waiman Long
2017-02-03 18:23 ` valdis.kletnieks
2017-02-03 18:42 ` Waiman Long [this message]
2017-02-03 19:26 ` valdis.kletnieks
2017-02-03 18:03 ` [PATCH-tip v5 18/21] TP-futex, doc: Update TP futexes document on shared locking Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 19/21] perf bench: Extend mutex/rwlock futex suite to test TP futexes Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 20/21] sched, TP-futex: Make wake_up_q() return wakeup count Waiman Long
2017-02-03 18:03 ` [PATCH-tip v5 21/21] futex: Dump internal futex state via debugfs Waiman Long
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=275d5112-eaa8-1158-b26d-4e18c8bf79e1@redhat.com \
--to=longman@redhat.com \
--cc=acme@kernel.org \
--cc=corbet@lwn.net \
--cc=dave@stgolabs.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=scott.norton@hpe.com \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.com \
--cc=valdis.kletnieks@vt.edu \
/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).