linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: torvalds@linux-foundation.org
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	paulus@samba.org, Davidlohr Bueso <davidlohr@hp.com>,
	tglx@linutronix.de, Paul McKenney <paulmck@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, mingo@kernel.org
Subject: Re: Tasks stuck in futex code (in 3.14-rc6)
Date: Fri, 21 Mar 2014 07:23:02 +1100	[thread overview]
Message-ID: <1395346982.3460.23.camel@pasglop> (raw)
In-Reply-To: <1395333093.14694.3.camel@buesod1.americas.hpqcorp.net>

On Thu, 2014-03-20 at 09:31 -0700, Davidlohr Bueso wrote:
> hmmm looking at ppc spinlock code, it seems that it doesn't have ticket
> spinlocks -- in fact Torsten Duwe has been trying to get them upstream
> very recently. Since we rely on the counter for detecting waiters, this
> might explain the issue. Could someone confirm this spinlock
> implementation difference? 

Indeed. I haven't merged ticket locks because they break lockref :-(

We have a problem here because we need to store the lock holder so we
can yield to the lock holder partition on contention and we are running
out of space in the spinlock.

The lock holder doesn't have to be atomic, so in theory we could have
the tickets and the lockref in the same 64-bit and the holder separately
but the way the layers are stacked at the moment that's not workable,
at least not without duplicating the whole lockref implementation and
breaking the spinlock in two, a "base" lock without older and the separate
variant with holder field. A mess...

I want to try sorting that out at some stage but haven't had a chance yet.

Cheers,
Ben.

  reply	other threads:[~2014-03-20 20:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 15:26 Tasks stuck in futex code (in 3.14-rc6) Srikar Dronamraju
2014-03-19 15:47 ` Peter Zijlstra
2014-03-19 16:09   ` Srikar Dronamraju
2014-03-19 17:08   ` Peter Zijlstra
2014-03-19 18:06     ` Davidlohr Bueso
2014-03-20  5:33     ` Srikar Dronamraju
2014-03-20  5:56       ` Davidlohr Bueso
2014-03-20 10:08         ` Srikar Dronamraju
2014-03-20 15:06           ` Davidlohr Bueso
2014-03-20 16:31         ` Davidlohr Bueso
2014-03-20 20:23           ` Benjamin Herrenschmidt [this message]
2014-03-20 16:41         ` Linus Torvalds
2014-03-20 17:18           ` Davidlohr Bueso
2014-03-20 17:42             ` Linus Torvalds
2014-03-20 18:03               ` Davidlohr Bueso
2014-03-20 18:16                 ` Linus Torvalds
2014-03-20 18:36             ` Linus Torvalds
2014-03-20 19:08               ` Davidlohr Bueso
2014-03-20 19:25                 ` Linus Torvalds
2014-03-20 20:20                   ` Davidlohr Bueso
2014-03-20 20:36                     ` Linus Torvalds
2014-03-21  4:55                     ` Srikar Dronamraju
2014-03-21  5:24                       ` Linus Torvalds
2014-03-22  2:27                         ` Srikar Dronamraju
2014-03-22  3:36                           ` Davidlohr Bueso
2014-03-20  7:23       ` Peter Zijlstra
2014-03-19 16:04 ` Linus Torvalds

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=1395346982.3460.23.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davidlohr@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).