Thread (45 messages) 45 messages, 6 authors, 2025-07-01

Re: [PATCH v4 3/4] mm: Support batched unmap for lazyfree large folios during reclamation

From: David Hildenbrand <hidden>
Date: 2025-06-26 21:53:03
Also in: linux-mm, linux-riscv, lkml

On 26.06.25 23:46, Barry Song wrote:
On Thu, Jun 26, 2025 at 9:29 PM Lance Yang [off-list ref] wrote:
quoted
[...]
quoted
+
+               /*
+                * If we are sure that we batched the entire folio and cleared
+                * all PTEs, we can just optimize and stop right here.
+                */
+               if (nr_pages == folio_nr_pages(folio))
David also mentioned if (nr_pages > 1 && nr_pages == folio_nr_pages(folio)).
I assume it’s still fine when nr_pages == 1 for small folios? No?
Yeah, as raised I think it is fine. We should never have any folio page 
mapped multiple times into the same VMA in any case. (excluding KSM 
pages, but they are handled differenty, using a specialized rmap walk)

-- 
Cheers,

David / dhildenb

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help