Skip to contentSkip to conversation

move alloc_tag.c file under mm/

PATCH Applied Suren Baghdasaryan 8 participants 11 messages Jun 25 – Jun 26

Subsystems (4)
lore
Share & tools
lore

Suren Baghdasaryan

author maintainer
#0 lore raw

cover move alloc_tag.c file under mm/

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/[email protected]/

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

Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog
author maintainer
#1 lore raw

PATCH 1/2 MAINTAINERS: move inactive maintainer to CREDITS

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

---
 CREDITS     | 4 ++++
 MAINTAINERS | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
CREDITS +4 -0
index 17962bdd6dbd..9a3e4b639505 100644
@@ -3091,6 +3091,10 @@ N: Jens Osterkamp
 E: [email protected]
 D: Maintainer of Spidernet network driver for Cell
 
+N: Kent Overstreet
+E: [email protected]
+D: Co-authored and contributed to Memory Allocation Profiling
+
 N: Gadi Oxman
 E: [email protected]
 D: Original author and maintainer of IDE/ATAPI floppy/tape drivers
MAINTAINERS +0 -1
index dd963b72c614..0948dc573744 100644
@@ -16706,7 +16706,6 @@ F:	tools/testing/memblock/
 
 MEMORY ALLOCATION PROFILING
 M:	Suren Baghdasaryan <[email protected]>
-M:	Kent Overstreet <[email protected]>
 R:	Hao Ge <[email protected]>
 L:	[email protected]
 S:	Maintained
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog
reviewer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] MAINTAINERS: move inactive maintainer to CREDITS

Quoted 6 lines · Suren Baghdasaryan

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

Quoted 33 lines
---
 CREDITS     | 4 ++++
 MAINTAINERS | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
CREDITS +4 -0
index 17962bdd6dbd..9a3e4b639505 100644
@@ -3091,6 +3091,10 @@ N: Jens Osterkamp
 E: [email protected]
 D: Maintainer of Spidernet network driver for Cell
 
+N: Kent Overstreet
+E: [email protected]
+D: Co-authored and contributed to Memory Allocation Profiling
+
 N: Gadi Oxman
 E: [email protected]
 D: Original author and maintainer of IDE/ATAPI floppy/tape drivers
MAINTAINERS +0 -2
index dd963b72c614..0948dc573744 100644
@@ -16706,7 +16706,6 @@ F:	tools/testing/memblock/
 
 MEMORY ALLOCATION PROFILING
 M:	Suren Baghdasaryan <[email protected]>
-M:	Kent Overstreet <[email protected]>
 R:	Hao Ge <[email protected]>
 L:	[email protected]
 S:	Maintained
--
Quoted 2 lines

2.55.0.rc0.799.gd6f94ed593-goog

Cheers, Lorenzo

author maintainer
#3 lore raw

PATCH 2/2 mm: move alloc tag to mm

In reply to Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

---
 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%)
MAINTAINERS +10 -10
index 0948dc573744..3cf3cf2311e2 100644
@@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
 F:	mm/rodata_test.c
 F:	tools/testing/memblock/
 
-MEMORY ALLOCATION PROFILING
-M:	Suren Baghdasaryan <[email protected]>
-R:	Hao Ge <[email protected]>
-L:	[email protected]
-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 <[email protected]>
 L:	[email protected]
@@ -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 <[email protected]>
+R:	Hao Ge <[email protected]>
+L:	[email protected]
+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 <[email protected]>
 M:	David Hildenbrand <[email protected]>
lib/Kconfig.debug +0 -28
index 8ff5adcfe1e0..3762015522c3 100644
@@ -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"
lib/Makefile +0 -1
index f33a24bf1c19..44f6538533a9 100644
@@ -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
 
mm/Kconfig.debug +28 -0
index 91b3e027b753..5737a504efbb 100644
@@ -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.
mm/Makefile +1 -0
index eff9f9e7e061..4fc713867b9b 100644
@@ -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
mm/alloc_tag.c renamed from lib/alloc_tag.c +0 -0
similarity index 100%
rename from lib/alloc_tag.c
rename to mm/alloc_tag.c
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

Quoted 5 lines · On Thu, 25 Jun 2026 11:48:57 -0700 Suren Baghdasaryan <[email protected]> wrote:

From: Lorenzo Stoakes <[email protected]>

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.

Quoted 3 lines

Thanks,
SJ

[...]

reviewer Tested-by Acked-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 8 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

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

LGTM.

Thanks

Best Regards

Hao

Quoted 148 lines
---
  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%)

MAINTAINERS +10 -10
index 0948dc573744..3cf3cf2311e2 100644
@@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
  F:	mm/rodata_test.c
  F:	tools/testing/memblock/
 
-MEMORY ALLOCATION PROFILING
-M:	Suren Baghdasaryan <[email protected]>
-R:	Hao Ge <[email protected]>
-L:	[email protected]
-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 <[email protected]>
  L:	[email protected]
@@ -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 <[email protected]>
+R:	Hao Ge <[email protected]>
+L:	[email protected]
+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 <[email protected]>
  M:	David Hildenbrand <[email protected]>
lib/Kconfig.debug +0 -28
index 8ff5adcfe1e0..3762015522c3 100644
@@ -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"
lib/Makefile +0 -1
index f33a24bf1c19..44f6538533a9 100644
@@ -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
 
mm/Kconfig.debug +28 -0
index 91b3e027b753..5737a504efbb 100644
@@ -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.
mm/Makefile +1 -0
index eff9f9e7e061..4fc713867b9b 100644
@@ -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
mm/alloc_tag.c renamed from lib/alloc_tag.c +0 -0
similarity index 100%
rename from lib/alloc_tag.c
rename to mm/alloc_tag.c
reviewer Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 8 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

Quoted 148 lines
---
 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%)
MAINTAINERS +10 -10
index 0948dc573744..3cf3cf2311e2 100644
@@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
 F:	mm/rodata_test.c
 F:	tools/testing/memblock/
 
-MEMORY ALLOCATION PROFILING
-M:	Suren Baghdasaryan <[email protected]>
-R:	Hao Ge <[email protected]>
-L:	[email protected]
-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 <[email protected]>
 L:	[email protected]
@@ -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 <[email protected]>
+R:	Hao Ge <[email protected]>
+L:	[email protected]
+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 <[email protected]>
 M:	David Hildenbrand <[email protected]>
lib/Kconfig.debug +0 -28
index 8ff5adcfe1e0..3762015522c3 100644
@@ -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"
lib/Makefile +0 -1
index f33a24bf1c19..44f6538533a9 100644
@@ -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
 
mm/Kconfig.debug +28 -0
index 91b3e027b753..5737a504efbb 100644
@@ -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.
mm/Makefile +1 -0
index eff9f9e7e061..4fc713867b9b 100644
@@ -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
mm/alloc_tag.c renamed from lib/alloc_tag.c +0 -0
similarity index 100%
rename from lib/alloc_tag.c
rename to mm/alloc_tag.c
maintainer Acked-by on v1 2/2
#7 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 8 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

Quoted 9 lines
---
 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 :)

Signature · 3 lines
Cheers,

David
reviewer Acked-by on v1 2/2
#8 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 8 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

Quoted 9 lines
---
 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%)
Signature · 2 lines
Sincerely yours,
Mike.
Acked-by on v1 2/2
#9 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 9 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

---

Signature · 2 lines
Cheers,
Harry / Hyeonggon
reviewer Reviewed-by on v1 2/2
#10 lore raw

Re: [PATCH 2/2] mm: move alloc tag to mm

In reply to Suren Baghdasaryan
Quoted 8 lines · Suren Baghdasaryan

From: Lorenzo Stoakes <[email protected]>

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.

LGTM (obviously :P) so:

Quoted 149 lines
---
 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%)
MAINTAINERS +10 -10
index 0948dc573744..3cf3cf2311e2 100644
@@ -16704,16 +16704,6 @@ F:	mm/mm_init.c
 F:	mm/rodata_test.c
 F:	tools/testing/memblock/
 
-MEMORY ALLOCATION PROFILING
-M:	Suren Baghdasaryan <[email protected]>
-R:	Hao Ge <[email protected]>
-L:	[email protected]
-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 <[email protected]>
 L:	[email protected]
@@ -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 <[email protected]>
+R:	Hao Ge <[email protected]>
+L:	[email protected]
+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 <[email protected]>
 M:	David Hildenbrand <[email protected]>
lib/Kconfig.debug +0 -28
index 8ff5adcfe1e0..3762015522c3 100644
@@ -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"
lib/Makefile +0 -1
index f33a24bf1c19..44f6538533a9 100644
@@ -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
 
mm/Kconfig.debug +28 -0
index 91b3e027b753..5737a504efbb 100644
@@ -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.
mm/Makefile +1 -0
index eff9f9e7e061..4fc713867b9b 100644
@@ -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
mm/alloc_tag.c renamed from lib/alloc_tag.c +0 -1
similarity index 100%
rename from lib/alloc_tag.c
rename to mm/alloc_tag.c
--
Quoted 2 lines

2.55.0.rc0.799.gd6f94ed593-goog

Thanks, Lorenzo