[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250523082517.3144-1-21cnbao@gmail.com>
Date: Fri, 23 May 2025 20:25:17 +1200
From: Barry Song <21cnbao@...il.com>
To: 21cnbao@...il.com,
david@...hat.com
Cc: Liam.Howlett@...cle.com,
akpm@...ux-foundation.org,
baolin.wang@...ux.alibaba.com,
bhe@...hat.com,
chrisl@...nel.org,
fan.ni@...sung.com,
harry.yoo@...cle.com,
kasong@...cent.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
lorenzo.stoakes@...cle.com,
mhocko@...e.com,
riel@...riel.com,
rppt@...nel.org,
ryan.roberts@....com,
schatzberg.dan@...il.com,
surenb@...gle.com,
v-songbaohua@...o.com,
vbabka@...e.cz,
yukaixiong@...wei.com,
zhengtangquan@...o.com
Subject: Re: [PATCH RFC] mm: make try_to_unmap_one support batched unmap for anon large folios
> @@ -2159,9 +2179,10 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma,
>
> /* See folio_try_share_anon_rmap(): clear PTE first. */
> if (anon_exclusive &&
> - folio_try_share_anon_rmap_pte(folio, subpage)) {
> - swap_free(entry);
> - set_pte_at(mm, address, pvmw.pte, pteval);
> + __folio_try_share_anon_rmap(folio, subpage, nr_pages,
> + RMAP_LEVEL_PTE)) {
I have a question for David regarding the __folio_try_share_anon_rmap()
function. I noticed that it only clears the Exclusive flag for the first
subpage, even when nr_pages > 1. Shouldn't we be clearing the Exclusive
flag for all subpages in this case? Could this be a potential bug?
Thanks
Barry
Powered by blists - more mailing lists