On 2024-04-07 15:44, Klara Modin wrote: > 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 >>>> Co-developed-by: Kent Overstreet >>>> Signed-off-by: Kent Overstreet >>> >>> 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@gmail.com/T/#u linux/smp.h may be needed as well. I tried cross-compiling the randconfig for riscv which complains of missing raw_smp_processor_id() and including linux/smp.h resolves that. Does this look reasonable, and if so, should I send it as well? diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h index afc9e259a2d3..7fe1cbdab0b0 100644 --- a/include/linux/alloc_tag.h +++ b/include/linux/alloc_tag.h @@ -13,6 +13,7 @@ #include #include #include +#include struct alloc_tag_counters { u64 bytes;