All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	dvhart@linux.intel.com, tglx@linutronix.de,
	paulmck@linux.vnet.ibm.com, efault@gmx.de, jeffm@suse.com,
	torvalds@linux-foundation.org, scott.norton@hp.com,
	tom.vaden@hp.com, aswin@hp.com, Waiman.Long@hp.com,
	jason.low2@hp.com
Subject: Re: [PATCH v2 4/4] futex: Avoid taking hb lock if nothing to wakeup
Date: Tue, 10 Dec 2013 19:00:54 +0100	[thread overview]
Message-ID: <20131210180054.GG13532@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1386696996.2731.18.camel@buesod1.americas.hpqcorp.net>

On Tue, Dec 10, 2013 at 09:36:36AM -0800, Davidlohr Bueso wrote:
> On Tue, 2013-12-10 at 18:15 +0100, Peter Zijlstra wrote:
> > - * The length of the list is tracked with atomic ops (hb->waiters),
> > - * providing the necessary memory barriers for the waiters. For the
> > - * waker side, however, we rely on get_futex_key_refs(), using either
> > - * ihold() or the atomic_inc(), for shared futexes. The former provides
> > - * a full mb on all architectures. For architectures that do not have an
> > - * implicit barrier in atomic_inc/dec, we explicitly add it - please
> > - * refer to futex_get_mm() and hb_waiters_inc/dec().
> 
> IMHO this text gives a nice summary instead of documenting each function
> with this things like '... implies MB (B)'. Anyway, I'll resend this
> patch with your corrections.

Right, I didn't much care for that. Once you know that you need them and
what for, the actual finding of the barriers is usually a 'trivial'
matter.



  reply	other threads:[~2013-12-10 18:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03  9:45 [PATCH v2 0/4] futex: Wakeup optimizations Davidlohr Bueso
2013-12-03  9:45 ` [PATCH v2 1/4] futex: Misc cleanups Davidlohr Bueso
2013-12-03  9:45 ` [PATCH v2 2/4] futex: Larger hash table Davidlohr Bueso
2013-12-03  9:45 ` [PATCH v2 3/4] futex: Document ordering guarantees Davidlohr Bueso
2013-12-03  9:45 ` [PATCH v2 4/4] futex: Avoid taking hb lock if nothing to wakeup Davidlohr Bueso
2013-12-06 18:26   ` Thomas Gleixner
2013-12-06 19:04     ` Davidlohr Bueso
2013-12-10 15:36       ` Ingo Molnar
2013-12-10 16:17         ` Davidlohr Bueso
2013-12-10 18:28           ` Ingo Molnar
2013-12-10 16:08   ` Peter Zijlstra
2013-12-10 16:24   ` Peter Zijlstra
2013-12-10 16:57   ` Peter Zijlstra
2013-12-10 17:22     ` Davidlohr Bueso
2013-12-10 17:34       ` Peter Zijlstra
2013-12-10 17:15   ` Peter Zijlstra
2013-12-10 17:36     ` Davidlohr Bueso
2013-12-10 18:00       ` Peter Zijlstra [this message]
2013-12-10 18:10   ` [PATCH v3 " Davidlohr Bueso
2013-12-12 17:30 ` [PATCH v2 0/4] futex: Wakeup optimizations Peter Zijlstra
2013-12-18 15:32 ` Davidlohr Bueso
2013-12-19 12:54   ` 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=20131210180054.GG13532@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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=scott.norton@hp.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.