From: Mike Rapoport <rppt@kernel.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: memfd_luo: always make all folios uptodate
Date: Fri, 6 Mar 2026 17:44:04 +0200 [thread overview]
Message-ID: <aar2RJ3Bvs6Egmq8@kernel.org> (raw)
In-Reply-To: <2vxzqzpybqyd.fsf@kernel.org>
On Thu, Mar 05, 2026 at 09:50:18AM +0100, Pratyush Yadav wrote:
> On Wed, Feb 25 2026, Mike Rapoport wrote:
>
> > On Mon, Feb 23, 2026 at 06:39:28PM +0100, Pratyush Yadav wrote:
> [...]
> >> +
> >> + /*
> >> + * If the folio is not uptodate, it was fallocated but never
> >> + * used. Saving this flag at prepare() doesn't work since it
> >> + * might change later when someone uses the folio.
> >> + *
> >> + * Since we have taken the performance penalty of allocating,
> >> + * zeroing, and pinning all the folios in the holes, take a bit
> >> + * more and zero all non-uptodate folios too.
> >> + *
> >> + * NOTE: For someone looking to improve preserve performance,
> >> + * this is a good place to look.
> >
> > I'd add a larger comment above memfd_luo_preserve_folios() that says that
> > it allocates, pins etc and fold the last two paragraphs of this comment
> > there.
>
> How about this:
>
> /*
> * If the folio is not uptodate, it was fallocated but never
> * used. Saving this flag at prepare() doesn't work since it
> * might change later when the folio is used. Make it uptodate
> * now to avoid this problem.
> */
> if (!folio_test_uptodate(folio)) {
>
> And the comment above memfd_pin_folios() gets this:
>
> * NOTE: For someone looking to improve preserve performance, this is a
> * good place to look. Also look at the folio zeroing below.
Looks great to me
> [...]
>
> --
> Regards,
> Pratyush Yadav
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-03-06 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 17:39 [PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation Pratyush Yadav
2026-02-23 17:39 ` [PATCH 1/2] mm: memfd_luo: always make all folios uptodate Pratyush Yadav
2026-02-25 8:53 ` Mike Rapoport
2026-03-05 8:50 ` Pratyush Yadav
2026-03-06 15:44 ` Mike Rapoport [this message]
2026-02-23 17:39 ` [PATCH 2/2] mm: memfd_luo: always dirty all folios Pratyush Yadav
2026-02-25 8:58 ` Mike Rapoport
2026-03-05 8:44 ` Pratyush Yadav
2026-03-05 10:40 ` Mike Rapoport
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=aar2RJ3Bvs6Egmq8@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=stable@vger.kernel.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