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: Barry Song <hidden>
Date: 2025-06-25 10:57:40
Also in: linux-mm, linux-riscv, lkml

quoted
Note that I don't quite understand why we have to batch the whole thing
or fallback to
individual pages. Why can't we perform other batches that span only some
PTEs? What's special
about 1 PTE vs. 2 PTEs vs. all PTEs?
That's a good point about the "all-or-nothing" batching logic ;)

It seems the "all-or-nothing" approach is specific to the lazyfree use
case, which needs to unmap the entire folio for reclamation. If that's
not possible, it falls back to the single-page slow path.
Other cases advance the PTE themselves, while try_to_unmap_one() relies
on page_vma_mapped_walk() to advance the PTE. Unless we want to manually
modify pvmw.pte and pvmw.address outside of page_vma_mapped_walk(), which
to me seems like a violation of layers. :-)

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