From: Andrew Morton <akpm@linux-foundation.org>
To: Hao Ge <hao.ge@linux.dev>
Cc: Abhishek Bapat <abhishekbapat@google.com>,
Suren Baghdasaryan <surenb@google.com>,
oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v5 2/5] alloc_tag: Introduce IOCTLs to toggle allocation tracepoints
Date: Fri, 6 Nov 2026 07:26:36 -0800 [thread overview]
Message-ID: <20261106072636.524e8f0a6a618e7b28988273@linux-foundation.org> (raw)
In-Reply-To: <9a4323e1-a966-41fe-8268-9d6621346fea@linux.dev>
On Fri, 6 Nov 2026 15:54:33 +0800 Hao Ge <hao.ge@linux.dev> wrote:
> >
> > -static inline bool alloc_tag_trace_enabled(const struct alloc_tag *tag)
> > +static __always_inline bool alloc_tag_trace_enabled(const struct alloc_tag *tag)
> > {
> > if (static_branch_unlikely(&alloc_tag_trace_key))
> > return tag && alloc_tag_is_traced(tag);
> > _
> >
>
>
> Thanks a lot for looking at this - and for putting together a fix at all.
>
> Perhaps alloc_tag_is_traced needs the same treatment as well?
>
> Even with your patch applied, I still hit the warning, just attributed to a different symbol:
>
> WARNING: modpost: vmlinux: section mismatch in reference:
> alloc_tag_is_traced+0x10 (section: .text.unlikely) -> initcall_level_names (section: .init.data)
>
> Marking both helpers __always_inline clears the warning in my build, and it would fit what the series
> intends for the fast path anyway.
Great, thanks, I added another -fix on top:
--- a/include/linux/alloc_tag.h~alloc_tag-introduce-ioctls-to-toggle-allocation-tracepoints-fix-fix
+++ a/include/linux/alloc_tag.h
@@ -156,7 +156,7 @@ static inline void alloc_tag_clear_trace
atomic_andnot(CODETAG_FLAG_TRACE_ON, &tag->ct.flags);
}
-static inline bool alloc_tag_is_traced(const struct alloc_tag *tag)
+static __always_inline inline bool alloc_tag_is_traced(const struct alloc_tag *tag)
{
return !!(atomic_read(&tag->ct.flags) & CODETAG_FLAG_TRACE_ON);
}
_
next prev parent reply other threads:[~2026-11-06 15:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 19:03 [PATCH v5 0/5] alloc_tag: Introduce selective tracing for MAP Abhishek Bapat
2026-11-04 19:03 ` [PATCH v5 1/5] alloc_tag: Add trace events for tracing allocations Abhishek Bapat
2026-11-04 19:03 ` [PATCH v5 2/5] alloc_tag: Introduce IOCTLs to toggle allocation tracepoints Abhishek Bapat
2026-11-05 15:15 ` kernel test robot
2026-11-06 1:21 ` Andrew Morton
2026-11-06 7:54 ` Hao Ge
2026-11-06 15:26 ` Andrew Morton [this message]
2026-11-04 19:03 ` [PATCH v5 3/5] alloc_tag: Add a flags field to allocinfo_filter Abhishek Bapat
2026-11-04 19:03 ` [PATCH v5 4/5] alloc_tag: Extend allocinfo_filter to support tracing queries Abhishek Bapat
2026-11-04 19:03 ` [PATCH v5 5/5] alloc_tag: Add a test for trace state toggle and filtering Abhishek Bapat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261106072636.524e8f0a6a618e7b28988273@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=abhishekbapat@google.com \
--cc=hao.ge@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=surenb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®