linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Mel Gorman <mgorman@techsingularity.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Chris Mason <clm@fb.com>, Darren Hart <dvhart@linux.intel.com>,
	Hugh Dickins <hughd@google.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key
Date: Thu, 4 Feb 2016 09:43:43 -0800	[thread overview]
Message-ID: <20160204174343.GA12375@linux-uzut.site> (raw)
In-Reply-To: <alpine.DEB.2.11.1602041002010.25254@nanos>

On Thu, 04 Feb 2016, Thomas Gleixner wrote:

>On Wed, 3 Feb 2016, Davidlohr Bueso wrote:
>> +		 * We are not calling into get_futex_key_refs() in file-backed
>> +		 * cases, therefore a successful atomic_inc return below will
>> +		 * guarantee that get_futex_key() will continue to imply MB (B).
>
>Can you please make that "MB (B)" part a bit more outstanding. I really had to
>search for it.

Hmm as you know this is mostly explained at the begining of the file, and we
sprinkle MB (B) around the code based on that description. So I'm a bit confused
as to why you don't like like that comment.

>> +		 */
>> +		if (WARN_ON_ONCE(!atomic_inc_not_zero(&inode->i_count))) {
>> +			rcu_read_unlock();
>> +			put_page(page);
>> +
>> +			goto again;
>> +		}
>
>Don't we need
>
>		smp_mb__after_atomic();
>
>here to make it a full barrier on all architectures?

I had this initially but, as Peter mentioned, we get that barrier with the
successful atomic_inc_not_zero call anyway. Or is it something else you had
in mind?

Thanks,
Davidlohr

  reply	other threads:[~2016-02-04 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  6:28 [PATCH v5] futex: Remove requirement for lock_page in get_futex_key Davidlohr Bueso
2016-02-04  9:06 ` Thomas Gleixner
2016-02-04 17:43   ` Davidlohr Bueso [this message]
2016-02-04 17:50     ` Thomas Gleixner
2016-02-05  9:44       ` Ingo Molnar
2016-02-05 18:02         ` Davidlohr Bueso
2016-02-06  8:22           ` 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=20160204174343.GA12375@linux-uzut.site \
    --to=dave@stgolabs.net \
    --cc=bigeasy@linutronix.de \
    --cc=clm@fb.com \
    --cc=dbueso@suse.de \
    --cc=dvhart@linux.intel.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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).