From: Andrew Morton <akpm@linux-foundation.org>
To: john.hubbard@gmail.com
Cc: Nick Piggin <npiggin@suse.de>,
linux-mm@kvack.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Dave Kleikamp <shaggy@linux.vnet.ibm.com>,
Hugh Dickins <hughd@google.com>, Jeff Layton <jlayton@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Vlastimil Babka <vbabka@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH 1/1] mm: page_cache_add_speculative(): refactor out some code duplication
Date: Thu, 7 Feb 2019 21:49:17 -0800 [thread overview]
Message-ID: <20190207214917.9d07ca3fc52d3df0cde018bd@linux-foundation.org> (raw)
In-Reply-To: <20190206231016.22734-2-jhubbard@nvidia.com>
On Wed, 6 Feb 2019 15:10:16 -0800 john.hubbard@gmail.com wrote:
> From: John Hubbard <jhubbard@nvidia.com>
>
> This combines the common elements of these routines:
>
> page_cache_get_speculative()
> page_cache_add_speculative()
>
> This was anticipated by the original author, as shown by the comment
> in commit ce0ad7f095258 ("powerpc/mm: Lockless get_user_pages_fast()
> for 64-bit (v3)"):
>
> "Same as above, but add instead of inc (could just be merged)"
>
> There is no intention to introduce any behavioral change, but there is a
> small risk of that, due to slightly differing ways of expressing the
> TINY_RCU and related configurations.
>
> This also removes the VM_BUG_ON(in_interrupt()) that was in
> page_cache_add_speculative(), but not in page_cache_get_speculative(). This
> provides slightly less detection of such bugs, but it given that it was
> only there on the "add" path anyway, we can likely do without it just fine.
It removes the
VM_BUG_ON_PAGE(PageCompound(page) && page != compound_head(page), page);
also.
We'll live ;)
prev parent reply other threads:[~2019-02-08 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190206231016.22734-1-jhubbard@nvidia.com>
2019-02-06 23:10 ` john.hubbard
2019-02-08 5:49 ` Andrew Morton [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=20190207214917.9d07ca3fc52d3df0cde018bd@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=hughd@google.com \
--cc=jhubbard@nvidia.com \
--cc=jlayton@kernel.org \
--cc=john.hubbard@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=shaggy@linux.vnet.ibm.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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