mm-vmalloc-enable-memory-allocation-profiling.patch removed from -mm tree
The quilt patch titled
Subject: mm: vmalloc: enable memory allocation profiling
has been removed from the -mm tree. Its filename was
mm-vmalloc-enable-memory-allocation-profiling.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Kent Overstreet <[email protected]>
Subject: mm: vmalloc: enable memory allocation profiling
Date: Thu, 21 Mar 2024 09:36:52 -0700
This wrapps all external vmalloc allocation functions with the alloc_hooks() wrapper, and switches internal allocations to _noprof variants where appropriate, for the new memory allocation profiling feature.
---
arch/um/include/shared/um_malloc.h | 3 drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 include/linux/vmalloc.h | 60 ++++++++++---- kernel/kallsyms_selftest.c | 2 mm/nommu.c | 56 ++++++------- mm/util.c | 18 ++-- mm/vmalloc.c | 74 +++++++++--------- 7 files changed, 123 insertions(+), 92 deletions(-)
arch/um/include/shared/um_malloc.h renamed from arch/um/include/shared/um_malloc.h~mm-vmalloc-enable-memory-allocation-profiling +2 -1
@@ -11,7 +11,8 @@extern void *uml_kmalloc (int size,int flags);extern void kfree (const void *ptr); -extern void *vmalloc (unsigned long size); +extern void *vmalloc_noprof (unsigned long size); +#define vmalloc (...) vmalloc_noprof(__VA_ARGS__)extern void vfree (void *ptr);#endif /* __UM_MALLOC_H__ */
drivers/staging/media/atomisp/pci/hmm/hmm.c renamed from drivers/staging/media/atomisp/pci/hmm/hmm.c~mm-vmalloc-enable-memory-allocation-profiling +1 -1
@@ -205,7 +205,7 @@ static ia_css_ptr __hmm_alloc(size_t byt }dev_dbg (atomisp_dev,"pages: 0x%08x (%zu bytes), type: %d, vmalloc %p\n" , - bo->start, bytes, type, vmalloc); + bo->start, bytes, type, vmalloc_noprof);return bo->start;
include/linux/vmalloc.h renamed from include/linux/vmalloc.h~mm-vmalloc-enable-memory-allocation-profiling +45 -15
77 lines not on this page · raw message
kernel/kallsyms_selftest.c renamed from kernel/kallsyms_selftest.c~mm-vmalloc-enable-memory-allocation-profiling +1 -1
@@ -82,7 +82,7 @@ static struct test_item test_items[] = {ITEM_FUNC (kallsyms_test_func_static),ITEM_FUNC (kallsyms_test_func),ITEM_FUNC (kallsyms_test_func_weak), -ITEM_FUNC (vmalloc), +ITEM_FUNC (vmalloc_noprof),ITEM_FUNC (vfree), #ifdef CONFIG_KALLSYMS_ALL ITEM_DATA(kallsyms_test_var_bss_static),
mm/nommu.c renamed from mm/nommu.c~mm-vmalloc-enable-memory-allocation-profiling +28 -28
139 lines not on this page · raw message
mm/util.c renamed from mm/util.c~mm-vmalloc-enable-memory-allocation-profiling +9 -9
@@ -656,7 +656,7 @@ void *kvmalloc_node_noprof(size_t size,* about the resulting pointer, and cannot play * protection games. */ -return __vmalloc_node_range (size,1 ,VMALLOC_START ,VMALLOC_END , +return __vmalloc_node_range_noprof (size,1 ,VMALLOC_START ,VMALLOC_END , flags,PAGE_KERNEL ,VM_ALLOW_HUGE_VMAP , node,__builtin_return_address (0 )); }
@@ -720,7 +720,7 @@ EXPORT_SYMBOL(kvrealloc_noprof);* @size: element size. * @flags: the type of memory to allocate (see kmalloc). */ -void *__vmalloc_array (size_t n,size_t size,gfp_t flags) +void *__vmalloc_array_noprof (size_t n,size_t size,gfp_t flags) {size_t bytes;
@@ -728,18 +728,18 @@ void *__vmalloc_array(size_t n, size_t sreturn NULL ;return __vmalloc (bytes, flags); } -EXPORT_SYMBOL (__vmalloc_array); +EXPORT_SYMBOL (__vmalloc_array_noprof);/** * vmalloc_array - allocate memory for a virtually contiguous array. * @n: number of elements. * @size: element size. */ -void *vmalloc_array (size_t n,size_t size) +void *vmalloc_array_noprof (size_t n,size_t size) {return __vmalloc_array (n, size,GFP_KERNEL ); } -EXPORT_SYMBOL (vmalloc_array); +EXPORT_SYMBOL (vmalloc_array_noprof);/** * __vcalloc - allocate and zero memory for a virtually contiguous array.
@@ -747,22 +747,22 @@ EXPORT_SYMBOL(vmalloc_array);* @size: element size. * @flags: the type of memory to allocate (see kmalloc). */ -void *__vcalloc (size_t n,size_t size,gfp_t flags) +void *__vcalloc_noprof (size_t n,size_t size,gfp_t flags) {return __vmalloc_array (n, size, flags | __GFP_ZERO); } -EXPORT_SYMBOL (__vcalloc); +EXPORT_SYMBOL (__vcalloc_noprof);/** * vcalloc - allocate and zero memory for a virtually contiguous array. * @n: number of elements. * @size: element size. */ -void *vcalloc (size_t n,size_t size) +void *vcalloc_noprof (size_t n,size_t size) {return __vmalloc_array (n, size,GFP_KERNEL | __GFP_ZERO); } -EXPORT_SYMBOL (vcalloc); +EXPORT_SYMBOL (vcalloc_noprof);struct anon_vma *folio_anon_vma (struct folio *folio) {
mm/vmalloc.c renamed from mm/vmalloc.c~mm-vmalloc-enable-memory-allocation-profiling +37 -37
201 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are