Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: rename zap_page_range_single_batched() to zap_vma_range_batched()

Let's make the naming more consistent with our new naming scheme.

While at it, polish the kerneldoc a bit.

Link: https://lkml.kernel.org/r/20260227200848.114019-14-david@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Arve <arve@android.com>
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>
Cc: Carlos Llamas <cmllamas@google.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Daniel Borkman <daniel@iogearbox.net>
Cc: Dave Airlie <airlied@gmail.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dimitri Sivanich <dimitri.sivanich@hpe.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jakub Kacinski <kuba@kernel.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Jann Horn <jannh@google.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Namhyung kim <namhyung@kernel.org>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand (Arm) and committed by
Andrew Morton
784a742e 32bc7fe4

+16 -14
+1 -1
mm/internal.h
··· 536 536 } 537 537 538 538 struct zap_details; 539 - void zap_page_range_single_batched(struct mmu_gather *tlb, 539 + void zap_vma_range_batched(struct mmu_gather *tlb, 540 540 struct vm_area_struct *vma, unsigned long addr, 541 541 unsigned long size, struct zap_details *details); 542 542 int zap_vma_for_reaping(struct vm_area_struct *vma);
+2 -3
mm/madvise.c
··· 855 855 .reclaim_pt = true, 856 856 }; 857 857 858 - zap_page_range_single_batched( 859 - madv_behavior->tlb, madv_behavior->vma, range->start, 860 - range->end - range->start, &details); 858 + zap_vma_range_batched(madv_behavior->tlb, madv_behavior->vma, 859 + range->start, range->end - range->start, &details); 861 860 return 0; 862 861 } 863 862
+13 -10
mm/memory.c
··· 2167 2167 } 2168 2168 2169 2169 /** 2170 - * zap_page_range_single_batched - remove user pages in a given range 2170 + * zap_vma_range_batched - zap page table entries in a vma range 2171 2171 * @tlb: pointer to the caller's struct mmu_gather 2172 - * @vma: vm_area_struct holding the applicable pages 2173 - * @address: starting address of pages to remove 2174 - * @size: number of bytes to remove 2175 - * @details: details of shared cache invalidation 2172 + * @vma: the vma covering the range to zap 2173 + * @address: starting address of the range to zap 2174 + * @size: number of bytes to zap 2175 + * @details: details specifying zapping behavior 2176 2176 * 2177 - * @tlb shouldn't be NULL. The range must fit into one VMA. If @vma is for 2178 - * hugetlb, @tlb is flushed and re-initialized by this function. 2177 + * @tlb must not be NULL. The provided address range must be fully 2178 + * contained within @vma. If @vma is for hugetlb, @tlb is flushed and 2179 + * re-initialized by this function. 2180 + * 2181 + * If @details is NULL, this function will zap all page table entries. 2179 2182 */ 2180 - void zap_page_range_single_batched(struct mmu_gather *tlb, 2183 + void zap_vma_range_batched(struct mmu_gather *tlb, 2181 2184 struct vm_area_struct *vma, unsigned long address, 2182 2185 unsigned long size, struct zap_details *details) 2183 2186 { ··· 2228 2225 struct mmu_gather tlb; 2229 2226 2230 2227 tlb_gather_mmu(&tlb, vma->vm_mm); 2231 - zap_page_range_single_batched(&tlb, vma, address, size, NULL); 2228 + zap_vma_range_batched(&tlb, vma, address, size, NULL); 2232 2229 tlb_finish_mmu(&tlb); 2233 2230 } 2234 2231 ··· 4254 4251 size = (end_idx - start_idx) << PAGE_SHIFT; 4255 4252 4256 4253 tlb_gather_mmu(&tlb, vma->vm_mm); 4257 - zap_page_range_single_batched(&tlb, vma, start, size, details); 4254 + zap_vma_range_batched(&tlb, vma, start, size, details); 4258 4255 tlb_finish_mmu(&tlb); 4259 4256 } 4260 4257 }