Re: [PATCH v8 3/5] tracing: Add stackmap statistics interface
From: Li Pengfei
Date: Sat Nov 07 2026 - 01:28:50 EST
From: Pengfei Li <lipengfei28@xxxxxxxxxx>
On Sat, 07 Nov 2026 06:04:59 +0000, sashiko-bot@xxxxxxxxxx wrote:
> Can ftrace_stackmap_get_cookie() undercount smap->fallbacks when the
> element pool runs out during a concurrent insert?
Yes. The slot left without an element makes later lookups of that stack
take the "insert in progress" exit, so they are recorded in full but not
counted. It only happens once the pool is exhausted, when fallbacks is
already non-zero, so the counter still shows that the map is full; it
just reads low. The next version counts that case as a fallback.
Thanks,
Pengfei Li