[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4yQhOTguZZWk_AeggxhJLD99TTT1nLmC6MoftinSSHt1A@mail.gmail.com>
Date: Tue, 14 Jan 2025 10:56:19 +1300
From: Barry Song <21cnbao@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
baolin.wang@...ux.alibaba.com, chrisl@...nel.org, ioworker0@...il.com,
kasong@...cent.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, ryan.roberts@....com, v-songbaohua@...o.com,
x86@...nel.org, linux-riscv@...ts.infradead.org, ying.huang@...el.com,
zhengtangquan@...o.com, lorenzo.stoakes@...cle.com, mfo@...onical.com
Subject: Re: [PATCH v2 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one
On Tue, Jan 14, 2025 at 2:21 AM David Hildenbrand <david@...hat.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@...o.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@...hat.com>
> >> Signed-off-by: Barry Song <v-songbaohua@...o.com>
> >> ---
> >
> > Acked-by: David Hildenbrand <david@...hat.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
Powered by blists - more mailing lists