From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: "Steinar H. Gunderson" <sgunderson@bigfoot.com>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: bisected: futex regression >= 3.14 - was - Slowdown due to threads bouncing between HT cores
Date: Wed, 8 Oct 2014 18:14:18 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1410081756250.4292@nanos> (raw)
In-Reply-To: <1412782664.5179.75.camel@marge.simpson.net>
On Wed, 8 Oct 2014, Mike Galbraith wrote:
> Seems you opened a can of futex worms...
Bah.
> I don't see that on the 2 x E5-2697 box I borrowed to take a peek. Once
> I got stockfish to actually run to completion by hunting down and brute
> force reverting the below, I see ~32 million nodes/sec throughput with
> 3.17 whether I use taskset or just let it do its thing.
>
> Without the revert, the thing starts up fine, runs for 5 seconds or so,
> then comes to a screeching halt with one thread looping endlessly...
>
> 1412780609.892144 futex(0xd3ed18, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000034>
> 1412780609.892216 futex(0xd3ed44, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 248307, {1412780609, 897000000}, ffffffff) = -1 ETIMEDOUT (Connection timed out) <0.004857>
> 1412780609.897144 futex(0xd3ed18, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000021>
> 1412780609.897202 futex(0xd3ed44, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 248309, {1412780609, 902000000}, ffffffff) = -1 ETIMEDOUT (Connection timed out) <0.004862>
> 1412780609.902157 futex(0xd3ed18, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000025>
> 1412780609.902226 futex(0xd3ed44, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 248311, {1412780609, 907000000}, ffffffff) = -1 ETIMEDOUT (Connection timed out) <0.004845>
> 1412780609.907144 futex(0xd3ed18, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000021>
> 1412780609.907202 futex(0xd3ed44, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 248313, {1412780609, 912000000}, ffffffff^CProcess 2756 detached
> <detached ...>
So that thread waits 5ms for the futex, times out, fiddles with a
different futex and waits some more...
As it looks from a short glance on the code it's a condition
variable... So if nothing updates and signals the condition, it will
show exactly that behaviour.
> I have not seen this on my little single socket E5620 box, nor on my 8
> socket 64 core DL980, but the DL980 is a poor crippled thing (8GB ram,
> interleaved), so may be too much of a slug (race? me? really!?!) to make
> anything bad happen. The 2 socket E5-2697 (28 core) box OTOH is a fully
> repeatable fail.
> 11d4616bd07f38d496bd489ed8fad1dc4d928823 is the first bad commit
> commit 11d4616bd07f38d496bd489ed8fad1dc4d928823
> Author: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Thu Mar 20 22:11:17 2014 -0700
>
> futex: revert back to the explicit waiter counting code
>
> Srikar Dronamraju reports that commit b0c29f79ecea ("futexes: Avoid
> taking the hb->lock if there's nothing to wake up") causes java threads
> getting stuck on futexes when runing specjbb on a power7 numa box.
>
> The cause appears to be that the powerpc spinlocks aren't using the same
> ticket lock model that we use on x86 (and other) architectures, which in
> turn result in the "spin_is_locked()" test in hb_waiters_pending()
> occasionally reporting an unlocked spinlock even when there are pending
> waiters.
Well, unfortunately we cannot revert that for obvious reasons and I
really doubt, that it is the real problem.
It looks far more like an issue with the stocking fish code, but hell
with futexes one can never be sure.
Thanks,
tglx
next prev parent reply other threads:[~2014-10-08 16:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 19:44 Steinar H. Gunderson
2014-10-03 21:11 ` Marc Burkhardt
2014-10-03 21:14 ` Steinar H. Gunderson
2014-10-04 9:22 ` Marc Burkhardt
2014-10-04 13:41 ` Andi Kleen
2014-10-04 14:12 ` Steinar H. Gunderson
2014-10-04 14:50 ` Chuck Ebbert
2014-10-05 11:19 ` Steinar H. Gunderson
2014-10-08 15:37 ` bisected: futex regression >= 3.14 - was - " Mike Galbraith
2014-10-08 16:14 ` Thomas Gleixner [this message]
2014-10-08 16:45 ` Steinar H. Gunderson
2014-10-08 17:52 ` Mike Galbraith
2014-10-08 16:23 ` Steinar H. Gunderson
2014-10-08 17:04 ` Linus Torvalds
2014-10-08 17:05 ` Steinar H. Gunderson
2014-10-08 17:59 ` Mike Galbraith
2014-10-24 15:25 ` Thomas Gleixner
2014-10-24 16:38 ` Mike Galbraith
2014-10-26 10:39 ` Steinar H. Gunderson
2014-10-26 13:16 ` Mike Galbraith
2014-10-26 13:58 ` Mike Galbraith
2014-10-26 14:11 ` Steinar H. Gunderson
2014-10-26 14:41 ` Mike Galbraith
2014-10-27 10:05 ` Mike Galbraith
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.11.1410081756250.4292@nanos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sgunderson@bigfoot.com \
--cc=torvalds@linux-foundation.org \
--cc=umgwanakikbuti@gmail.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
all inboxes | Powered by JetHome®