Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] move alloc_tag.c file under mm/
@ 2026-06-25 18:48 Suren Baghdasaryan
  2026-06-25 18:48 ` [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS Suren Baghdasaryan
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
  0 siblings, 2 replies; 11+ messages in thread
From: Suren Baghdasaryan @ 2026-06-25 18:48 UTC (permalink / raw)
  To: akpm
  Cc: kent.overstreet, david, ljs, liam, vbabka, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm, surenb

Memory allocation profiling is ultimately an mm feature and now that we
need to use some internal mm definitions in it [1], the time is right to
move its implementation under mm/. The move is straight-forward, involving
just alloc_tag.c file. Update config, makefiles and maintainers as well.

[1] https://lore.kernel.org/all/20260622-alloc-trylock-v2-13-31f31367d420@google.com/

Lorenzo Stoakes (1):
  mm: move alloc tag to mm

Suren Baghdasaryan (1):
  MAINTAINERS: move inactive maintainer to CREDITS

 CREDITS                 |  4 ++++
 MAINTAINERS             | 21 ++++++++++-----------
 lib/Kconfig.debug       | 28 ----------------------------
 lib/Makefile            |  1 -
 mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
 mm/Makefile             |  1 +
 {lib => mm}/alloc_tag.c |  0
 7 files changed, 43 insertions(+), 40 deletions(-)
 rename {lib => mm}/alloc_tag.c (100%)


base-commit: 81652c5a65d4ae28e9b18c16ef917a40025c3653
-- 
2.55.0.rc0.799.gd6f94ed593-goog



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

* [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS
  2026-06-25 18:48 [PATCH 0/2] move alloc_tag.c file under mm/ Suren Baghdasaryan
@ 2026-06-25 18:48 ` Suren Baghdasaryan
  2026-06-26 10:13   ` Lorenzo Stoakes
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
  1 sibling, 1 reply; 11+ messages in thread
From: Suren Baghdasaryan @ 2026-06-25 18:48 UTC (permalink / raw)
  To: akpm
  Cc: kent.overstreet, david, ljs, liam, vbabka, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm, surenb

Move Kent Overstreet from maintainers for Memory Allocation Profiling to
CREDITS in recognition of his co-authorship and contributions to this
feature.

Cc: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
 CREDITS     | 4 ++++
 MAINTAINERS | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CREDITS b/CREDITS
index 17962bdd6dbd..9a3e4b639505 100644
--- a/CREDITS
+++ b/CREDITS
@@ -3091,6 +3091,10 @@ N: Jens Osterkamp
 E: jens@de.ibm.com
 D: Maintainer of Spidernet network driver for Cell
 
+N: Kent Overstreet
+E: kent.overstreet@linux.dev
+D: Co-authored and contributed to Memory Allocation Profiling
+
 N: Gadi Oxman
 E: gadio@netvision.net.il
 D: Original author and maintainer of IDE/ATAPI floppy/tape drivers
diff --git a/MAINTAINERS b/MAINTAINERS
index dd963b72c614..0948dc573744 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16706,7 +16706,6 @@ F:	tools/testing/memblock/
 
 MEMORY ALLOCATION PROFILING
 M:	Suren Baghdasaryan <surenb@google.com>
-M:	Kent Overstreet <kent.overstreet@linux.dev>
 R:	Hao Ge <hao.ge@linux.dev>
 L:	linux-mm@kvack.org
 S:	Maintained
-- 
2.55.0.rc0.799.gd6f94ed593-goog



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

* [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 [PATCH 0/2] move alloc_tag.c file under mm/ Suren Baghdasaryan
  2026-06-25 18:48 ` [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS Suren Baghdasaryan
@ 2026-06-25 18:48 ` Suren Baghdasaryan
  2026-06-25 23:56   ` SeongJae Park
                     ` (6 more replies)
  1 sibling, 7 replies; 11+ messages in thread
From: Suren Baghdasaryan @ 2026-06-25 18:48 UTC (permalink / raw)
  To: akpm
  Cc: kent.overstreet, david, ljs, liam, vbabka, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm, surenb

From: Lorenzo Stoakes <ljs@kernel.org>

The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
and additionally update the MAINTAINERS entry to place it within memory
management and port over the Kconfig and Makefile code to mm.

Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
 MAINTAINERS             | 20 ++++++++++----------
 lib/Kconfig.debug       | 28 ----------------------------
 lib/Makefile            |  1 -
 mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
 mm/Makefile             |  1 +
 {lib => mm}/alloc_tag.c |  0
 6 files changed, 39 insertions(+), 39 deletions(-)
 rename {lib => mm}/alloc_tag.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0948dc573744..3cf3cf2311e2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
 F:	mm/rodata_test.c
 F:	tools/testing/memblock/
 
-MEMORY ALLOCATION PROFILING
-M:	Suren Baghdasaryan <surenb@google.com>
-R:	Hao Ge <hao.ge@linux.dev>
-L:	linux-mm@kvack.org
-S:	Maintained
-F:	Documentation/mm/allocation-profiling.rst
-F:	include/linux/alloc_tag.h
-F:	include/linux/pgalloc_tag.h
-F:	lib/alloc_tag.c
-
 MEMORY CONTROLLER DRIVERS
 M:	Krzysztof Kozlowski <krzk@kernel.org>
 L:	linux-kernel@vger.kernel.org
@@ -16758,6 +16748,16 @@ T:	quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
 F:	mm/
 F:	tools/mm/
 
+MEMORY MANAGEMENT - ALLOCATION PROFILING (ALLOC TAG)
+M:	Suren Baghdasaryan <surenb@google.com>
+R:	Hao Ge <hao.ge@linux.dev>
+L:	linux-mm@kvack.org
+S:	Maintained
+F:	Documentation/mm/allocation-profiling.rst
+F:	include/linux/alloc_tag.h
+F:	include/linux/pgalloc_tag.h
+F:	mm/alloc_tag.c
+
 MEMORY MANAGEMENT - BALLOON
 M:	Andrew Morton <akpm@linux-foundation.org>
 M:	David Hildenbrand <david@kernel.org>
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8ff5adcfe1e0..3762015522c3 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1048,34 +1048,6 @@ config CODE_TAGGING
 	bool
 	select KALLSYMS
 
-config MEM_ALLOC_PROFILING
-	bool "Enable memory allocation profiling"
-	default n
-	depends on MMU
-	depends on PROC_FS
-	depends on !DEBUG_FORCE_WEAK_PER_CPU
-	select CODE_TAGGING
-	select PAGE_EXTENSION
-	select SLAB_OBJ_EXT
-	help
-	  Track allocation source code and record total allocation size
-	  initiated at that code location. The mechanism can be used to track
-	  memory leaks with a low performance and memory impact.
-
-config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
-	bool "Enable memory allocation profiling by default"
-	default y
-	depends on MEM_ALLOC_PROFILING
-
-config MEM_ALLOC_PROFILING_DEBUG
-	bool "Memory allocation profiler debugging"
-	default n
-	depends on MEM_ALLOC_PROFILING
-	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
-	help
-	  Adds warnings with helpful error messages for memory allocation
-	  profiling.
-
 source "lib/Kconfig.kasan"
 source "lib/Kconfig.kfence"
 source "lib/Kconfig.kmsan"
diff --git a/lib/Makefile b/lib/Makefile
index f33a24bf1c19..44f6538533a9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -197,7 +197,6 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
 obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
 
 obj-$(CONFIG_CODE_TAGGING) += codetag.o
-obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
 
 lib-$(CONFIG_GENERIC_BUG) += bug.o
 
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 91b3e027b753..5737a504efbb 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -320,3 +320,31 @@ config PER_VMA_LOCK_STATS
 	  overhead in the page fault path.
 
 	  If in doubt, say N.
+
+config MEM_ALLOC_PROFILING
+	bool "Enable memory allocation profiling"
+	default n
+	depends on MMU
+	depends on PROC_FS
+	depends on !DEBUG_FORCE_WEAK_PER_CPU
+	select CODE_TAGGING
+	select PAGE_EXTENSION
+	select SLAB_OBJ_EXT
+	help
+	  Track allocation source code and record total allocation size
+	  initiated at that code location. The mechanism can be used to track
+	  memory leaks with a low performance and memory impact.
+
+config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
+	bool "Enable memory allocation profiling by default"
+	default y
+	depends on MEM_ALLOC_PROFILING
+
+config MEM_ALLOC_PROFILING_DEBUG
+	bool "Memory allocation profiler debugging"
+	default n
+	depends on MEM_ALLOC_PROFILING
+	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
+	help
+	  Adds warnings with helpful error messages for memory allocation
+	  profiling.
diff --git a/mm/Makefile b/mm/Makefile
index eff9f9e7e061..4fc713867b9b 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -147,3 +147,4 @@ obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
 obj-$(CONFIG_EXECMEM) += execmem.o
 obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
 obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o
+obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
diff --git a/lib/alloc_tag.c b/mm/alloc_tag.c
similarity index 100%
rename from lib/alloc_tag.c
rename to mm/alloc_tag.c
-- 
2.55.0.rc0.799.gd6f94ed593-goog



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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
@ 2026-06-25 23:56   ` SeongJae Park
  2026-06-26  2:24   ` Hao Ge
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: SeongJae Park @ 2026-06-25 23:56 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: SeongJae Park, akpm, kent.overstreet, david, ljs, liam, vbabka,
	rppt, hao.ge, jackmanb, linux-kernel, linux-mm

On Thu, 25 Jun 2026 11:48:57 -0700 Suren Baghdasaryan <surenb@google.com> wrote:

> From: Lorenzo Stoakes <ljs@kernel.org>
> 
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.

Makes sense to me.

> 
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

[...]


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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
  2026-06-25 23:56   ` SeongJae Park
@ 2026-06-26  2:24   ` Hao Ge
  2026-06-26  9:12   ` Vlastimil Babka (SUSE)
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Hao Ge @ 2026-06-26  2:24 UTC (permalink / raw)
  To: Suren Baghdasaryan, akpm
  Cc: kent.overstreet, david, ljs, liam, vbabka, rppt, jackmanb,
	linux-kernel, linux-mm


On 2026/6/26 02:48, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
>
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
>
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>


I've applied this to my local tree and everything looks good.

LGTM.


Tested-by: Hao Ge <hao.ge@linux.dev>

Acked-by: Hao Ge <hao.ge@linux.dev>


Thanks

Best Regards

Hao


> ---
>   MAINTAINERS             | 20 ++++++++++----------
>   lib/Kconfig.debug       | 28 ----------------------------
>   lib/Makefile            |  1 -
>   mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
>   mm/Makefile             |  1 +
>   {lib => mm}/alloc_tag.c |  0
>   6 files changed, 39 insertions(+), 39 deletions(-)
>   rename {lib => mm}/alloc_tag.c (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0948dc573744..3cf3cf2311e2 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
>   F:	mm/rodata_test.c
>   F:	tools/testing/memblock/
>   
> -MEMORY ALLOCATION PROFILING
> -M:	Suren Baghdasaryan <surenb@google.com>
> -R:	Hao Ge <hao.ge@linux.dev>
> -L:	linux-mm@kvack.org
> -S:	Maintained
> -F:	Documentation/mm/allocation-profiling.rst
> -F:	include/linux/alloc_tag.h
> -F:	include/linux/pgalloc_tag.h
> -F:	lib/alloc_tag.c
> -
>   MEMORY CONTROLLER DRIVERS
>   M:	Krzysztof Kozlowski <krzk@kernel.org>
>   L:	linux-kernel@vger.kernel.org
> @@ -16758,6 +16748,16 @@ T:	quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
>   F:	mm/
>   F:	tools/mm/
>   
> +MEMORY MANAGEMENT - ALLOCATION PROFILING (ALLOC TAG)
> +M:	Suren Baghdasaryan <surenb@google.com>
> +R:	Hao Ge <hao.ge@linux.dev>
> +L:	linux-mm@kvack.org
> +S:	Maintained
> +F:	Documentation/mm/allocation-profiling.rst
> +F:	include/linux/alloc_tag.h
> +F:	include/linux/pgalloc_tag.h
> +F:	mm/alloc_tag.c
> +
>   MEMORY MANAGEMENT - BALLOON
>   M:	Andrew Morton <akpm@linux-foundation.org>
>   M:	David Hildenbrand <david@kernel.org>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 8ff5adcfe1e0..3762015522c3 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1048,34 +1048,6 @@ config CODE_TAGGING
>   	bool
>   	select KALLSYMS
>   
> -config MEM_ALLOC_PROFILING
> -	bool "Enable memory allocation profiling"
> -	default n
> -	depends on MMU
> -	depends on PROC_FS
> -	depends on !DEBUG_FORCE_WEAK_PER_CPU
> -	select CODE_TAGGING
> -	select PAGE_EXTENSION
> -	select SLAB_OBJ_EXT
> -	help
> -	  Track allocation source code and record total allocation size
> -	  initiated at that code location. The mechanism can be used to track
> -	  memory leaks with a low performance and memory impact.
> -
> -config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	bool "Enable memory allocation profiling by default"
> -	default y
> -	depends on MEM_ALLOC_PROFILING
> -
> -config MEM_ALLOC_PROFILING_DEBUG
> -	bool "Memory allocation profiler debugging"
> -	default n
> -	depends on MEM_ALLOC_PROFILING
> -	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	help
> -	  Adds warnings with helpful error messages for memory allocation
> -	  profiling.
> -
>   source "lib/Kconfig.kasan"
>   source "lib/Kconfig.kfence"
>   source "lib/Kconfig.kmsan"
> diff --git a/lib/Makefile b/lib/Makefile
> index f33a24bf1c19..44f6538533a9 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -197,7 +197,6 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
>   obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
>   
>   obj-$(CONFIG_CODE_TAGGING) += codetag.o
> -obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
>   
>   lib-$(CONFIG_GENERIC_BUG) += bug.o
>   
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index 91b3e027b753..5737a504efbb 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -320,3 +320,31 @@ config PER_VMA_LOCK_STATS
>   	  overhead in the page fault path.
>   
>   	  If in doubt, say N.
> +
> +config MEM_ALLOC_PROFILING
> +	bool "Enable memory allocation profiling"
> +	default n
> +	depends on MMU
> +	depends on PROC_FS
> +	depends on !DEBUG_FORCE_WEAK_PER_CPU
> +	select CODE_TAGGING
> +	select PAGE_EXTENSION
> +	select SLAB_OBJ_EXT
> +	help
> +	  Track allocation source code and record total allocation size
> +	  initiated at that code location. The mechanism can be used to track
> +	  memory leaks with a low performance and memory impact.
> +
> +config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	bool "Enable memory allocation profiling by default"
> +	default y
> +	depends on MEM_ALLOC_PROFILING
> +
> +config MEM_ALLOC_PROFILING_DEBUG
> +	bool "Memory allocation profiler debugging"
> +	default n
> +	depends on MEM_ALLOC_PROFILING
> +	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	help
> +	  Adds warnings with helpful error messages for memory allocation
> +	  profiling.
> diff --git a/mm/Makefile b/mm/Makefile
> index eff9f9e7e061..4fc713867b9b 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -147,3 +147,4 @@ obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
>   obj-$(CONFIG_EXECMEM) += execmem.o
>   obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
>   obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o
> +obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
> diff --git a/lib/alloc_tag.c b/mm/alloc_tag.c
> similarity index 100%
> rename from lib/alloc_tag.c
> rename to mm/alloc_tag.c


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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
  2026-06-25 23:56   ` SeongJae Park
  2026-06-26  2:24   ` Hao Ge
@ 2026-06-26  9:12   ` Vlastimil Babka (SUSE)
  2026-06-26  9:13   ` David Hildenbrand (Arm)
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-06-26  9:12 UTC (permalink / raw)
  To: Suren Baghdasaryan, akpm
  Cc: kent.overstreet, david, ljs, liam, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm

On 6/25/26 20:48, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
> 
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
> 
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>

> ---
>  MAINTAINERS             | 20 ++++++++++----------
>  lib/Kconfig.debug       | 28 ----------------------------
>  lib/Makefile            |  1 -
>  mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
>  mm/Makefile             |  1 +
>  {lib => mm}/alloc_tag.c |  0
>  6 files changed, 39 insertions(+), 39 deletions(-)
>  rename {lib => mm}/alloc_tag.c (100%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0948dc573744..3cf3cf2311e2 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
>  F:	mm/rodata_test.c
>  F:	tools/testing/memblock/
>  
> -MEMORY ALLOCATION PROFILING
> -M:	Suren Baghdasaryan <surenb@google.com>
> -R:	Hao Ge <hao.ge@linux.dev>
> -L:	linux-mm@kvack.org
> -S:	Maintained
> -F:	Documentation/mm/allocation-profiling.rst
> -F:	include/linux/alloc_tag.h
> -F:	include/linux/pgalloc_tag.h
> -F:	lib/alloc_tag.c
> -
>  MEMORY CONTROLLER DRIVERS
>  M:	Krzysztof Kozlowski <krzk@kernel.org>
>  L:	linux-kernel@vger.kernel.org
> @@ -16758,6 +16748,16 @@ T:	quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
>  F:	mm/
>  F:	tools/mm/
>  
> +MEMORY MANAGEMENT - ALLOCATION PROFILING (ALLOC TAG)
> +M:	Suren Baghdasaryan <surenb@google.com>
> +R:	Hao Ge <hao.ge@linux.dev>
> +L:	linux-mm@kvack.org
> +S:	Maintained
> +F:	Documentation/mm/allocation-profiling.rst
> +F:	include/linux/alloc_tag.h
> +F:	include/linux/pgalloc_tag.h
> +F:	mm/alloc_tag.c
> +
>  MEMORY MANAGEMENT - BALLOON
>  M:	Andrew Morton <akpm@linux-foundation.org>
>  M:	David Hildenbrand <david@kernel.org>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 8ff5adcfe1e0..3762015522c3 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1048,34 +1048,6 @@ config CODE_TAGGING
>  	bool
>  	select KALLSYMS
>  
> -config MEM_ALLOC_PROFILING
> -	bool "Enable memory allocation profiling"
> -	default n
> -	depends on MMU
> -	depends on PROC_FS
> -	depends on !DEBUG_FORCE_WEAK_PER_CPU
> -	select CODE_TAGGING
> -	select PAGE_EXTENSION
> -	select SLAB_OBJ_EXT
> -	help
> -	  Track allocation source code and record total allocation size
> -	  initiated at that code location. The mechanism can be used to track
> -	  memory leaks with a low performance and memory impact.
> -
> -config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	bool "Enable memory allocation profiling by default"
> -	default y
> -	depends on MEM_ALLOC_PROFILING
> -
> -config MEM_ALLOC_PROFILING_DEBUG
> -	bool "Memory allocation profiler debugging"
> -	default n
> -	depends on MEM_ALLOC_PROFILING
> -	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	help
> -	  Adds warnings with helpful error messages for memory allocation
> -	  profiling.
> -
>  source "lib/Kconfig.kasan"
>  source "lib/Kconfig.kfence"
>  source "lib/Kconfig.kmsan"
> diff --git a/lib/Makefile b/lib/Makefile
> index f33a24bf1c19..44f6538533a9 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -197,7 +197,6 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
>  obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
>  
>  obj-$(CONFIG_CODE_TAGGING) += codetag.o
> -obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
>  
>  lib-$(CONFIG_GENERIC_BUG) += bug.o
>  
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index 91b3e027b753..5737a504efbb 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -320,3 +320,31 @@ config PER_VMA_LOCK_STATS
>  	  overhead in the page fault path.
>  
>  	  If in doubt, say N.
> +
> +config MEM_ALLOC_PROFILING
> +	bool "Enable memory allocation profiling"
> +	default n
> +	depends on MMU
> +	depends on PROC_FS
> +	depends on !DEBUG_FORCE_WEAK_PER_CPU
> +	select CODE_TAGGING
> +	select PAGE_EXTENSION
> +	select SLAB_OBJ_EXT
> +	help
> +	  Track allocation source code and record total allocation size
> +	  initiated at that code location. The mechanism can be used to track
> +	  memory leaks with a low performance and memory impact.
> +
> +config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	bool "Enable memory allocation profiling by default"
> +	default y
> +	depends on MEM_ALLOC_PROFILING
> +
> +config MEM_ALLOC_PROFILING_DEBUG
> +	bool "Memory allocation profiler debugging"
> +	default n
> +	depends on MEM_ALLOC_PROFILING
> +	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	help
> +	  Adds warnings with helpful error messages for memory allocation
> +	  profiling.
> diff --git a/mm/Makefile b/mm/Makefile
> index eff9f9e7e061..4fc713867b9b 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -147,3 +147,4 @@ obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
>  obj-$(CONFIG_EXECMEM) += execmem.o
>  obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
>  obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o
> +obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
> diff --git a/lib/alloc_tag.c b/mm/alloc_tag.c
> similarity index 100%
> rename from lib/alloc_tag.c
> rename to mm/alloc_tag.c



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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
                     ` (2 preceding siblings ...)
  2026-06-26  9:12   ` Vlastimil Babka (SUSE)
@ 2026-06-26  9:13   ` David Hildenbrand (Arm)
  2026-06-26  9:17   ` Mike Rapoport
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: David Hildenbrand (Arm) @ 2026-06-26  9:13 UTC (permalink / raw)
  To: Suren Baghdasaryan, akpm
  Cc: kent.overstreet, ljs, liam, vbabka, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm

On 6/25/26 20:48, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
> 
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
> 
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> ---
>  MAINTAINERS             | 20 ++++++++++----------
>  lib/Kconfig.debug       | 28 ----------------------------
>  lib/Makefile            |  1 -
>  mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
>  mm/Makefile             |  1 +
>  {lib => mm}/alloc_tag.c |  0
>  6 files changed, 39 insertions(+), 39 deletions(-)
>  rename {lib => mm}/alloc_tag.c (100%)

Yes, this belongs into mm :)

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David


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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
                     ` (3 preceding siblings ...)
  2026-06-26  9:13   ` David Hildenbrand (Arm)
@ 2026-06-26  9:17   ` Mike Rapoport
  2026-06-26  9:26   ` Harry Yoo
  2026-06-26 10:12   ` Lorenzo Stoakes
  6 siblings, 0 replies; 11+ messages in thread
From: Mike Rapoport @ 2026-06-26  9:17 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: akpm, kent.overstreet, david, ljs, liam, vbabka, hao.ge, jackmanb,
	linux-kernel, linux-mm

On Thu, Jun 25, 2026 at 11:48:57AM -0700, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
> 
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
> 
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
>  MAINTAINERS             | 20 ++++++++++----------
>  lib/Kconfig.debug       | 28 ----------------------------
>  lib/Makefile            |  1 -
>  mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
>  mm/Makefile             |  1 +
>  {lib => mm}/alloc_tag.c |  0
>  6 files changed, 39 insertions(+), 39 deletions(-)
>  rename {lib => mm}/alloc_tag.c (100%)

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
                     ` (4 preceding siblings ...)
  2026-06-26  9:17   ` Mike Rapoport
@ 2026-06-26  9:26   ` Harry Yoo
  2026-06-26 10:12   ` Lorenzo Stoakes
  6 siblings, 0 replies; 11+ messages in thread
From: Harry Yoo @ 2026-06-26  9:26 UTC (permalink / raw)
  To: Suren Baghdasaryan, akpm
  Cc: kent.overstreet, david, ljs, liam, vbabka, rppt, hao.ge, jackmanb,
	linux-kernel, linux-mm


[-- Attachment #1.1: Type: text/plain, Size: 518 bytes --]



On 6/26/26 3:48 AM, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
> 
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
> 
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> ---

Acked-by: Harry Yoo (Oracle) <harry@kernel.org>

-- 
Cheers,
Harry / Hyeonggon

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 2/2] mm: move alloc tag to mm
  2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
                     ` (5 preceding siblings ...)
  2026-06-26  9:26   ` Harry Yoo
@ 2026-06-26 10:12   ` Lorenzo Stoakes
  6 siblings, 0 replies; 11+ messages in thread
From: Lorenzo Stoakes @ 2026-06-26 10:12 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: akpm, kent.overstreet, david, liam, vbabka, rppt, hao.ge,
	jackmanb, linux-kernel, linux-mm

On Thu, Jun 25, 2026 at 11:48:57AM -0700, Suren Baghdasaryan wrote:
> From: Lorenzo Stoakes <ljs@kernel.org>
>
> The alloc tagging work is really mm-specific, so move alloc_tag.c to mm/
> and additionally update the MAINTAINERS entry to place it within memory
> management and port over the Kconfig and Makefile code to mm.
>
> Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

LGTM (obviously :P) so:

Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>

> ---
>  MAINTAINERS             | 20 ++++++++++----------
>  lib/Kconfig.debug       | 28 ----------------------------
>  lib/Makefile            |  1 -
>  mm/Kconfig.debug        | 28 ++++++++++++++++++++++++++++
>  mm/Makefile             |  1 +
>  {lib => mm}/alloc_tag.c |  0
>  6 files changed, 39 insertions(+), 39 deletions(-)
>  rename {lib => mm}/alloc_tag.c (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0948dc573744..3cf3cf2311e2 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
>  F:	mm/rodata_test.c
>  F:	tools/testing/memblock/
>
> -MEMORY ALLOCATION PROFILING
> -M:	Suren Baghdasaryan <surenb@google.com>
> -R:	Hao Ge <hao.ge@linux.dev>
> -L:	linux-mm@kvack.org
> -S:	Maintained
> -F:	Documentation/mm/allocation-profiling.rst
> -F:	include/linux/alloc_tag.h
> -F:	include/linux/pgalloc_tag.h
> -F:	lib/alloc_tag.c
> -
>  MEMORY CONTROLLER DRIVERS
>  M:	Krzysztof Kozlowski <krzk@kernel.org>
>  L:	linux-kernel@vger.kernel.org
> @@ -16758,6 +16748,16 @@ T:	quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
>  F:	mm/
>  F:	tools/mm/
>
> +MEMORY MANAGEMENT - ALLOCATION PROFILING (ALLOC TAG)
> +M:	Suren Baghdasaryan <surenb@google.com>
> +R:	Hao Ge <hao.ge@linux.dev>
> +L:	linux-mm@kvack.org
> +S:	Maintained
> +F:	Documentation/mm/allocation-profiling.rst
> +F:	include/linux/alloc_tag.h
> +F:	include/linux/pgalloc_tag.h
> +F:	mm/alloc_tag.c
> +
>  MEMORY MANAGEMENT - BALLOON
>  M:	Andrew Morton <akpm@linux-foundation.org>
>  M:	David Hildenbrand <david@kernel.org>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 8ff5adcfe1e0..3762015522c3 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1048,34 +1048,6 @@ config CODE_TAGGING
>  	bool
>  	select KALLSYMS
>
> -config MEM_ALLOC_PROFILING
> -	bool "Enable memory allocation profiling"
> -	default n
> -	depends on MMU
> -	depends on PROC_FS
> -	depends on !DEBUG_FORCE_WEAK_PER_CPU
> -	select CODE_TAGGING
> -	select PAGE_EXTENSION
> -	select SLAB_OBJ_EXT
> -	help
> -	  Track allocation source code and record total allocation size
> -	  initiated at that code location. The mechanism can be used to track
> -	  memory leaks with a low performance and memory impact.
> -
> -config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	bool "Enable memory allocation profiling by default"
> -	default y
> -	depends on MEM_ALLOC_PROFILING
> -
> -config MEM_ALLOC_PROFILING_DEBUG
> -	bool "Memory allocation profiler debugging"
> -	default n
> -	depends on MEM_ALLOC_PROFILING
> -	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> -	help
> -	  Adds warnings with helpful error messages for memory allocation
> -	  profiling.
> -
>  source "lib/Kconfig.kasan"
>  source "lib/Kconfig.kfence"
>  source "lib/Kconfig.kmsan"
> diff --git a/lib/Makefile b/lib/Makefile
> index f33a24bf1c19..44f6538533a9 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -197,7 +197,6 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
>  obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
>
>  obj-$(CONFIG_CODE_TAGGING) += codetag.o
> -obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
>
>  lib-$(CONFIG_GENERIC_BUG) += bug.o
>
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index 91b3e027b753..5737a504efbb 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -320,3 +320,31 @@ config PER_VMA_LOCK_STATS
>  	  overhead in the page fault path.
>
>  	  If in doubt, say N.
> +
> +config MEM_ALLOC_PROFILING
> +	bool "Enable memory allocation profiling"
> +	default n
> +	depends on MMU
> +	depends on PROC_FS
> +	depends on !DEBUG_FORCE_WEAK_PER_CPU
> +	select CODE_TAGGING
> +	select PAGE_EXTENSION
> +	select SLAB_OBJ_EXT
> +	help
> +	  Track allocation source code and record total allocation size
> +	  initiated at that code location. The mechanism can be used to track
> +	  memory leaks with a low performance and memory impact.
> +
> +config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	bool "Enable memory allocation profiling by default"
> +	default y
> +	depends on MEM_ALLOC_PROFILING
> +
> +config MEM_ALLOC_PROFILING_DEBUG
> +	bool "Memory allocation profiler debugging"
> +	default n
> +	depends on MEM_ALLOC_PROFILING
> +	select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
> +	help
> +	  Adds warnings with helpful error messages for memory allocation
> +	  profiling.
> diff --git a/mm/Makefile b/mm/Makefile
> index eff9f9e7e061..4fc713867b9b 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -147,3 +147,4 @@ obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
>  obj-$(CONFIG_EXECMEM) += execmem.o
>  obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
>  obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o
> +obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
> diff --git a/lib/alloc_tag.c b/mm/alloc_tag.c
> similarity index 100%
> rename from lib/alloc_tag.c
> rename to mm/alloc_tag.c
> --
> 2.55.0.rc0.799.gd6f94ed593-goog
>

Thanks, Lorenzo


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

* Re: [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS
  2026-06-25 18:48 ` [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS Suren Baghdasaryan
@ 2026-06-26 10:13   ` Lorenzo Stoakes
  0 siblings, 0 replies; 11+ messages in thread
From: Lorenzo Stoakes @ 2026-06-26 10:13 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: akpm, kent.overstreet, david, liam, vbabka, rppt, hao.ge,
	jackmanb, linux-kernel, linux-mm

On Thu, Jun 25, 2026 at 11:48:56AM -0700, Suren Baghdasaryan wrote:
> Move Kent Overstreet from maintainers for Memory Allocation Profiling to
> CREDITS in recognition of his co-authorship and contributions to this
> feature.
>
> Cc: Kent Overstreet <kent.overstreet@linux.dev>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Acked-by: Lorenzo Stoakes <ljs@kernel.org>

> ---
>  CREDITS     | 4 ++++
>  MAINTAINERS | 1 -
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/CREDITS b/CREDITS
> index 17962bdd6dbd..9a3e4b639505 100644
> --- a/CREDITS
> +++ b/CREDITS
> @@ -3091,6 +3091,10 @@ N: Jens Osterkamp
>  E: jens@de.ibm.com
>  D: Maintainer of Spidernet network driver for Cell
>
> +N: Kent Overstreet
> +E: kent.overstreet@linux.dev
> +D: Co-authored and contributed to Memory Allocation Profiling
> +
>  N: Gadi Oxman
>  E: gadio@netvision.net.il
>  D: Original author and maintainer of IDE/ATAPI floppy/tape drivers
> diff --git a/MAINTAINERS b/MAINTAINERS
> index dd963b72c614..0948dc573744 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16706,7 +16706,6 @@ F:	tools/testing/memblock/
>
>  MEMORY ALLOCATION PROFILING
>  M:	Suren Baghdasaryan <surenb@google.com>
> -M:	Kent Overstreet <kent.overstreet@linux.dev>
>  R:	Hao Ge <hao.ge@linux.dev>
>  L:	linux-mm@kvack.org
>  S:	Maintained
> --
> 2.55.0.rc0.799.gd6f94ed593-goog
>

Cheers, Lorenzo


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

end of thread, other threads:[~2026-06-26 10:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-25 18:48 [PATCH 0/2] move alloc_tag.c file under mm/ Suren Baghdasaryan
2026-06-25 18:48 ` [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS Suren Baghdasaryan
2026-06-26 10:13   ` Lorenzo Stoakes
2026-06-25 18:48 ` [PATCH 2/2] mm: move alloc tag to mm Suren Baghdasaryan
2026-06-25 23:56   ` SeongJae Park
2026-06-26  2:24   ` Hao Ge
2026-06-26  9:12   ` Vlastimil Babka (SUSE)
2026-06-26  9:13   ` David Hildenbrand (Arm)
2026-06-26  9:17   ` Mike Rapoport
2026-06-26  9:26   ` Harry Yoo
2026-06-26 10:12   ` Lorenzo Stoakes

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