linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Remove redundant test from find_get_pages_contig
Date: Tue, 8 Jan 2019 13:36:21 -0800	[thread overview]
Message-ID: <20190108213621.GH6310@bombadil.infradead.org> (raw)
In-Reply-To: <20190108132649.8f25386d966f04b0bccd6d77@linux-foundation.org>

On Tue, Jan 08, 2019 at 01:26:49PM -0800, Andrew Morton wrote:
> On Tue, 8 Jan 2019 12:26:35 -0800 Matthew Wilcox <willy@infradead.org> wrote:
> 
> > > Would it be excessively cautious to put a WARN_ON_ONCE() in there for a
> > > while?
> > 
> > I think it would ... it'd get in the way of a subsequent patch to store
> > only head pages in the page cache.
> 
> OK, shall grab.  Perhaps the changelog could gain a few words
> explaining the history, etc.

Yeah, I suck at changelogs.  Particularly when I've encountered something
that's distracting me from the thing I was trying to do.  How about this:

mm: Remove redundant test from find_get_pages_contig

After we establish a reference on the page, we check the pointer
continues to be in the correct position in i_pages.  Checking page->index
afterwards is unnecessary; if it were to change, then the pointer to it
from the page cache would also move.  The check used to be done before
grabbing a reference on the page which was racy (see 9cbb4cb21b19f
("mm: find_get_pages_contig fixlet")), but nobody noticed that moving
the check after grabbing the reference was redundant.

Signed-off-by: Matthew Wilcox <willy@infradead.org>

      reply	other threads:[~2019-01-08 21:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 20:02 Matthew Wilcox
2019-01-07 22:33 ` Andrew Morton
2019-01-07 22:39   ` Matthew Wilcox
2019-01-07 23:09     ` Andrew Morton
2019-01-08 20:26       ` Matthew Wilcox
2019-01-08 21:26         ` Andrew Morton
2019-01-08 21:36           ` Matthew Wilcox [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=20190108213621.GH6310@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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