From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-mm@kvack.org, mm-commits@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.5-rc1
Date: Wed, 28 Jun 2023 10:27:44 -0700 [thread overview]
Message-ID: <CAHk-=wjyJyV=Kyb8XJcLjFEPP-RMF0J6CQfT2OXLmJdM2yEv8w@mail.gmail.com> (raw)
In-Reply-To: <20230626085035.e66992e96b4c6d37dad54bd9@linux-foundation.org>
On Mon, 26 Jun 2023 at 08:50, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> Linus, please merge the MM updates for the 6.5-rc cycle.
> [...]
> merge conflict in mm/gup.c, vs block tree:
> https://lkml.kernel.org/r/20230616115856.3ce7682c@canb.auug.org.au
Hmm. I think this merge resolution in -next is wrong.
It now does a common
folio = try_get_folio(page, refs);
if (flags & FOLL_GET)
return folio;
for both FOLL_GET and FOLL_PIN, and then *after* that for the FOLL_PIN
case it does that
/*
* Don't take a pin on the zero page - it's not going anywhere
* and it is used in a *lot* of places.
*/
if (is_zero_page(page))
return page_folio(page);
but by then it has already done the try_get_folio().
End result: it has already updated refcounts, despite the comment
saying not to do that.
So I think it needs to match the comment (and the try_grab_page()
logic), and just basically
if (flags & FOLL_GET)
return try_get_folio(page, refs);
if (is_zero_page(page))
return page_folio(page);
folio = try_get_folio(page, refs);
if (!folio)
return NULL;
instead.
That's what my resolution is going to do, but let's add others to the
participants list just in case somebody goes "No, Linus, the reason
-next does that is XYZ"...
Linus
next prev parent reply other threads:[~2023-06-28 17:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 15:50 [GIT PULL] MM updates for 6.5-rc1 Andrew Morton
2023-06-28 17:27 ` Linus Torvalds [this message]
2023-06-28 18:19 ` Linus Torvalds
2023-06-28 19:18 ` David Howells
2023-06-28 18:49 ` pr-tracker-bot
2023-06-28 19:10 ` David Howells
2023-06-28 19:19 ` Linus Torvalds
2023-06-28 19:50 ` Lorenzo Stoakes
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='CAHk-=wjyJyV=Kyb8XJcLjFEPP-RMF0J6CQfT2OXLmJdM2yEv8w@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).