Re: [PATCH v6 13/37] lib: add allocation tagging support for memory allocation profiling

From: Klara Modin
Date: Sun Apr 07 2024 - 09:44:25 EST


On 2024-04-06 23:47, Kent Overstreet wrote:
On Fri, Apr 05, 2024 at 03:54:45PM +0200, Klara Modin wrote:
Hi,

On 2024-03-21 17:36, Suren Baghdasaryan wrote:
Introduce CONFIG_MEM_ALLOC_PROFILING which provides definitions to easily
instrument memory allocators. It registers an "alloc_tags" codetag type
with /proc/allocinfo interface to output allocation tag information when
the feature is enabled.
CONFIG_MEM_ALLOC_PROFILING_DEBUG is provided for debugging the memory
allocation profiling instrumentation.
Memory allocation profiling can be enabled or disabled at runtime using
/proc/sys/vm/mem_profiling sysctl when CONFIG_MEM_ALLOC_PROFILING_DEBUG=n.
CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT enables memory allocation
profiling by default.

Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Co-developed-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>
Signed-off-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>

With this commit (9e2dcefa791e9d14006b360fba3455510fd3325d in
next-20240404), randconfig with KCONFIG_SEED=0xE6264236 fails to build
with the attached error. The following patch fixes the build error for me,
but I don't know if it's correct.

Looks good - if you sound out an official patch I'll ack it.


I gave it a try and sent out a patch [1]. This is my first time doing that and it's likely not without mistakes.

1. https://lore.kernel.org/lkml/20240407133252.173636-1-klarasmodin@xxxxxxxxx/T/#u