Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] mm: convert to walk_page_range_vma() to eliminate find_vma()
@ 2026-06-18  9:28 Kefeng Wang
  2026-06-18  9:28 ` [PATCH v2 1/4] mm: mincore: use walk_page_range_vma() in do_mincore() Kefeng Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Kefeng Wang @ 2026-06-18  9:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Zi Yan, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Suren Baghdasaryan, linux-mm, Kefeng Wang

walk_page_range() performs a find_vma() lookup on each page table walk.
For callers that already hold a valid VMA and operate on a known
single-VMA range, this lookup is redundant. Replace walk_page_range()
with walk_page_range_vma() where the caller guarantees single-VMA
semantics.

v2:
- Address comments from Zi and David
  - per-vma optimization is separated out
  - Remove unneeded prot_none_test()
  - Fix some spells and collect ACK/RB

Kefeng Wang (4):
  mm: mincore: use walk_page_range_vma() in do_mincore()
  mm: mprotect: use walk_page_range_vma() in mprotect_fixup()
  mm: mlock: use walk_page_range_vma() in mlock_vma_pages_range()
  mm: migrate_device: use walk_page_range_vma() in migrate_vma_collect()

 mm/migrate_device.c |  2 +-
 mm/mincore.c        | 16 +++++++++++++++-
 mm/mlock.c          |  2 +-
 mm/mprotect.c       |  9 +--------
 4 files changed, 18 insertions(+), 11 deletions(-)

-- 
2.27.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-06-18 13:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18  9:28 [PATCH v2 0/4] mm: convert to walk_page_range_vma() to eliminate find_vma() Kefeng Wang
2026-06-18  9:28 ` [PATCH v2 1/4] mm: mincore: use walk_page_range_vma() in do_mincore() Kefeng Wang
2026-06-18 11:34   ` David Hildenbrand (Arm)
2026-06-18 11:49   ` Pedro Falcato
2026-06-18 12:58     ` David Hildenbrand (Arm)
2026-06-18 13:01     ` Kefeng Wang
2026-06-18  9:28 ` [PATCH v2 2/4] mm: mprotect: use walk_page_range_vma() in mprotect_fixup() Kefeng Wang
2026-06-18 11:52   ` Pedro Falcato
2026-06-18  9:28 ` [PATCH v2 3/4] mm: mlock: use walk_page_range_vma() in mlock_vma_pages_range() Kefeng Wang
2026-06-18 11:53   ` Pedro Falcato
2026-06-18  9:28 ` [PATCH v2 4/4] mm: migrate_device: use walk_page_range_vma() in migrate_vma_collect() Kefeng Wang
2026-06-18 11:53   ` Pedro Falcato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox