From: Barry Song <21cnbao@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
baolin.wang@linux.alibaba.com, chrisl@kernel.org,
ioworker0@gmail.com, kasong@tencent.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, ryan.roberts@arm.com,
v-songbaohua@oppo.com, x86@kernel.org,
linux-riscv@lists.infradead.org, ying.huang@intel.com,
zhengtangquan@oppo.com, lorenzo.stoakes@oracle.com,
mfo@canonical.com
Subject: Re: [PATCH v2 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one
Date: Tue, 14 Jan 2025 10:56:19 +1300 [thread overview]
Message-ID: <CAGsJ_4yQhOTguZZWk_AeggxhJLD99TTT1nLmC6MoftinSSHt1A@mail.gmail.com> (raw)
In-Reply-To: <e36243bb-5a6f-4ef7-ae3e-99d204009afb@redhat.com>
On Tue, Jan 14, 2025 at 2:21 AM David Hildenbrand <david@redhat.com> wrote:
>
> On 13.01.25 14:19, David Hildenbrand wrote:
> > On 13.01.25 04:38, Barry Song wrote:
> >> From: Barry Song <v-songbaohua@oppo.com>
> >>
> >> The refcount may be temporarily or long-term increased, but this does
> >> not change the fundamental nature of the folio already being lazy-
> >> freed. Therefore, we only reset 'swapbacked' when we are certain the
> >> folio is dirty and not droppable.
> >>
> >> Suggested-by: David Hildenbrand <david@redhat.com>
> >> Signed-off-by: Barry Song <v-songbaohua@oppo.com>
> >> ---
> >
> > Acked-by: David Hildenbrand <david@redhat.com>
> >
Thanks!
>
> Ah, should this have a Fixes: ?
That makes sense to me.
>
> Because of a speculative reference, we might not reclaim MADV_FREE
> folios as we silently mark them as swapbacked again, which sounds fairly
> wrong.
>
I assume the tag should be applied to Mauricio's commit 6c8e2a256915a2 ("mm:
fix race between MADV_FREE reclaim and blkdev direct IO read") and also
Mauricio is CC'ed.
> --
> Cheers,
>
> David / dhildenb
>
Thanks
Barry
next prev parent reply other threads:[~2025-01-13 21:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 3:38 [PATCH v2 0/4] mm: batched unmap lazyfree large folios during reclamation Barry Song
2025-01-13 3:38 ` [PATCH v2 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one Barry Song
2025-01-13 13:19 ` David Hildenbrand
2025-01-13 13:20 ` David Hildenbrand
2025-01-13 21:56 ` Barry Song [this message]
2025-01-14 2:55 ` Baolin Wang
2025-01-14 6:05 ` Lance Yang
2025-01-13 3:38 ` [PATCH v2 2/4] mm: Support tlbbatch flush for a range of PTEs Barry Song
2025-01-13 16:48 ` Will Deacon
2025-01-14 9:52 ` David Hildenbrand
2025-01-14 10:37 ` Barry Song
2025-01-13 3:39 ` [PATCH v2 3/4] mm: Support batched unmap for lazyfree large folios during reclamation Barry Song
2025-01-13 3:39 ` [PATCH v2 4/4] mm: Avoid splitting pmd for lazyfree pmd-mapped THP in try_to_unmap Barry Song
2025-01-14 3:40 ` Baolin Wang
2025-01-14 4:09 ` Barry Song
2025-01-14 6:00 ` Barry Song
2025-01-14 7:51 ` Baolin Wang
2025-01-14 6:30 ` Lance Yang
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=CAGsJ_4yQhOTguZZWk_AeggxhJLD99TTT1nLmC6MoftinSSHt1A@mail.gmail.com \
--to=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=ioworker0@gmail.com \
--cc=kasong@tencent.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mfo@canonical.com \
--cc=ryan.roberts@arm.com \
--cc=v-songbaohua@oppo.com \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
--cc=zhengtangquan@oppo.com \
/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