[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2200255e-4db5-4a45-a032-c2bc02617caa@gmail.com>
Date: Sun, 7 Apr 2024 18:50:51 +0200
From: Klara Modin <klarasmodin@...il.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: Suren Baghdasaryan <surenb@...gle.com>, akpm@...ux-foundation.org,
mhocko@...e.com, vbabka@...e.cz, hannes@...xchg.org,
roman.gushchin@...ux.dev, mgorman@...e.de, dave@...olabs.net,
willy@...radead.org, liam.howlett@...cle.com,
penguin-kernel@...ove.sakura.ne.jp, corbet@....net, void@...ifault.com,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, juri.lelli@...hat.com,
catalin.marinas@....com, will@...nel.org, arnd@...db.de, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
peterx@...hat.com, david@...hat.com, axboe@...nel.dk, mcgrof@...nel.org,
masahiroy@...nel.org, Nathan Chancellor <nathan@...nel.org>,
dennis@...nel.org, jhubbard@...dia.com, tj@...nel.org,
muchun.song@...ux.dev, rppt@...nel.org, paulmck@...nel.org,
pasha.tatashin@...een.com, yosryahmed@...gle.com, yuzhao@...gle.com,
David Howells <dhowells@...hat.com>, hughd@...gle.com, andreyknvl@...il.com,
keescook@...omium.org, ndesaulniers@...gle.com, vvvvvv@...gle.com,
gregkh@...uxfoundation.org, ebiggers@...gle.com, ytcoode@...il.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
bsegall@...gle.com, bristot@...hat.com, vschneid@...hat.com, cl@...ux.com,
penberg@...nel.org, iamjoonsoo.kim@....com, 42.hyeyoo@...il.com,
glider@...gle.com, elver@...gle.com, dvyukov@...gle.com,
songmuchun@...edance.com, jbaron@...mai.com, aliceryhl@...gle.com,
rientjes@...gle.com, minchan@...gle.com, kaleshsingh@...gle.com,
kernel-team@...roid.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
linux-arch@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-modules@...r.kernel.org,
kasan-dev@...glegroups.com, cgroups@...r.kernel.org
Subject: Re: [PATCH v6 13/37] lib: add allocation tagging support for memory
allocation profiling
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 <surenb@...gle.com>
>>>> Co-developed-by: Kent Overstreet <kent.overstreet@...ux.dev>
>>>> Signed-off-by: Kent Overstreet <kent.overstreet@...ux.dev>
>>>
>>> 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 <linux/cpumask.h>
#include <linux/static_key.h>
#include <linux/irqflags.h>
+#include <linux/smp.h>
struct alloc_tag_counters {
u64 bytes;
Download attachment "randconfig-riscv.gz" of type "application/gzip" (42191 bytes)
View attachment "riscv-alloc_tag-error" of type "text/plain" (3328 bytes)
Powered by blists - more mailing lists