public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Chris Mason <clm@fb.com>, Darren Hart <dvhart@linux.intel.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH] futex: Reduce the scope of lock_page, aka lockless futex_get_key()
Date: Tue, 5 Jan 2016 13:11:40 -0800	[thread overview]
Message-ID: <20160105211140.GA15919@linux-uzut.site> (raw)
In-Reply-To: <20160105204342.GA15465@linux-uzut.site>

On Tue, 05 Jan 2016, Bueso wrote:

>On Tue, 05 Jan 2016, Peter Zijlstra wrote:
>
>>On Tue, Jan 05, 2016 at 12:23:55PM -0800, Davidlohr Bueso wrote:
>>>+	if (unlikely(!mapping)) {
>>>+		int shmem_swizzled;
>>>+
>>>+		/*
>>>+		 * Page lock is required to identify which special case above
>>>+		 * applies. If this is really a shmem page then the page lock
>>>+		 * will prevent unexpected transitions.
>>>+		 */
>>>+		lock_page(page);
>>>+		shmem_swizzled = PageSwapCache(page);
>>> 		unlock_page(page);
>>> 		put_page(page);
>>>+		WARN_ON_ONCE(mapping);
>>
>>We've not re-loaded mapping, so how could this possibly be?
>
>Yep, this wants to be page->mapping.

Actually under compound_head() afaict, along with the rest of the page->mapping
loads.

      reply	other threads:[~2016-01-05 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 20:23 [PATCH] futex: Reduce the scope of lock_page, aka lockless futex_get_key() Davidlohr Bueso
2016-01-05 20:33 ` Peter Zijlstra
2016-01-05 20:43   ` Davidlohr Bueso
2016-01-05 21:11     ` Davidlohr Bueso [this message]

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=20160105211140.GA15919@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=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --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