[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7XA6JEUOgOkz988@osiris>
Date: Wed, 4 Jan 2023 19:09:44 +0100
From: Heiko Carstens <hca@...ux.ibm.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, netdev@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
David Hildenbrand <david@...hat.com>,
Michal Hocko <mhocko@...e.com>, Peter Xu <peterx@...hat.com>,
Nadav Amit <nadav.amit@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
Rik van Riel <riel@...riel.com>,
Will Deacon <will@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
Palmer Dabbelt <palmer@...belt.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Christian Brauner <brauner@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: remove zap_page_range and create zap_vma_pages
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/
> Suggested-by: Peter Xu <peterx@...hat.com>
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
> ---
> RFC->v1 Created zap_vma_pages to zap entire vma (Christoph Hellwig)
> Did not add Acked-by's as routine was changed.
>
> arch/arm64/kernel/vdso.c | 6 ++---
> arch/powerpc/kernel/vdso.c | 4 +---
> arch/powerpc/platforms/book3s/vas-api.c | 2 +-
> arch/powerpc/platforms/pseries/vas.c | 3 +--
> arch/riscv/kernel/vdso.c | 6 ++---
> arch/s390/kernel/vdso.c | 4 +---
> arch/s390/mm/gmap.c | 2 +-
> arch/x86/entry/vdso/vma.c | 4 +---
> drivers/android/binder_alloc.c | 2 +-
> include/linux/mm.h | 7 ++++--
> mm/memory.c | 30 -------------------------
> mm/page-writeback.c | 2 +-
> net/ipv4/tcp.c | 7 +++---
> 13 files changed, 21 insertions(+), 58 deletions(-)
For s390:
Acked-by: Heiko Carstens <hca@...ux.ibm.com>
Powered by blists - more mailing lists