Thread (7 messages) 7 messages, 7 authors, 2023-02-28

Re: [PATCH] mm: remove zap_page_range and create zap_vma_pages

From: Peter Xu <peterx@redhat.com>
Date: 2023-01-04 16:50:44
Also in: linux-mm, linux-riscv, linux-s390, lkml, netdev

On Tue, Jan 03, 2023 at 04:27:32PM -0800, Mike Kravetz wrote:
zap_page_range was originally designed to unmap pages within an address
range that could span multiple vmas.  While working on [1], it was
discovered that all callers of zap_page_range pass a range entirely within
a single vma.  In addition, the mmu notification call within zap_page
range does not correctly handle ranges that span multiple vmas.  When
crossing a vma boundary, a new mmu_notifier_range_init/end call pair
with the new vma should be made.

Instead of fixing zap_page_range, do the following:
- Create a new routine zap_vma_pages() that will remove all pages within
  the passed vma.  Most users of zap_page_range pass the entire vma and
  can use this new routine.
- For callers of zap_page_range not passing the entire vma, instead call
  zap_page_range_single().
- Remove zap_page_range.

[1] https://lore.kernel.org/linux-mm/20221114235507.294320-2-mike.kravetz@oracle.com/ (local)
Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Mike Kravetz <redacted>
Acked-by: Peter Xu <peterx@redhat.com>

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