linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: kent.overstreet@linux.dev, vbabka@suse.cz, hannes@cmpxchg.org,
	usamaarif642@gmail.com, rientjes@google.com,
	roman.gushchin@linux.dev, harry.yoo@oracle.com,
	shakeel.butt@linux.dev, 00107082@163.com, pyyjason@gmail.com,
	pasha.tatashin@soleen.com, souravpanda@google.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] alloc_tag: mark inaccurate allocation counters in /proc/allocinfo output
Date: Mon, 15 Sep 2025 17:11:12 -0700	[thread overview]
Message-ID: <20250915171112.f71a7606a7f9fd3054662bed@linux-foundation.org> (raw)
In-Reply-To: <20250915230224.4115531-1-surenb@google.com>

On Mon, 15 Sep 2025 16:02:24 -0700 Suren Baghdasaryan <surenb@google.com> wrote:

> While rare, memory allocation profiling can contain inaccurate counters
> if slab object extension vector allocation fails. That allocation might
> succeed later but prior to that, slab allocations that would have used
> that object extension vector will not be accounted for. To indicate
> incorrect counters, "accurate:no" marker is appended to the call site
> line in the /proc/allocinfo output.
> Bump up /proc/allocinfo version to reflect the change in the file format
> and update documentation.
> 
> Example output with invalid counters:
> allocinfo - version: 2.0
>            0        0 arch/x86/kernel/kdebugfs.c:105 func:create_setup_data_nodes
>            0        0 arch/x86/kernel/alternative.c:2090 func:alternatives_smp_module_add
>            0        0 arch/x86/kernel/alternative.c:127 func:__its_alloc accurate:no
>            0        0 arch/x86/kernel/fpu/regset.c:160 func:xstateregs_set
>            0        0 arch/x86/kernel/fpu/xstate.c:1590 func:fpstate_realloc
>            0        0 arch/x86/kernel/cpu/aperfmperf.c:379 func:arch_enable_hybrid_capacity_scale
>            0        0 arch/x86/kernel/cpu/amd_cache_disable.c:258 func:init_amd_l3_attrs
>        49152       48 arch/x86/kernel/cpu/mce/core.c:2709 func:mce_device_create accurate:no
>        32768        1 arch/x86/kernel/cpu/mce/genpool.c:132 func:mce_gen_pool_create
>            0        0 arch/x86/kernel/cpu/mce/amd.c:1341 func:mce_threshold_create_device
> 
> ...
>
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -1009,6 +1009,10 @@ number, module (if originates from a loadable module) and the function calling
>  the allocation. The number of bytes allocated and number of calls at each
>  location are reported. The first line indicates the version of the file, the
>  second line is the header listing fields in the file.
> +If file version is 2.0 or higher then each line may contain additional
> +<key>:<value> pairs representing extra information about the call site.
> +For example if the counters are not accurate, the line will be appended with
> +"accurate:no" pair.

Perhaps we can tell people what accurate:no actually means.  It is a
rather disturbing thing to see!  How worried should our users be about
it?


  parent reply	other threads:[~2025-09-16  0:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 23:02 Suren Baghdasaryan
2025-09-15 23:05 ` Suren Baghdasaryan
2025-09-16  0:11 ` Andrew Morton [this message]
2025-09-16  2:48   ` Suren Baghdasaryan
2025-09-16  2:56     ` Andrew Morton
2025-09-16  3:34       ` Suren Baghdasaryan
2025-09-16  4:21         ` Andrew Morton
2025-09-16  4:39           ` Suren Baghdasaryan
2025-09-16 16:02             ` Suren Baghdasaryan
2025-09-16 12:57 ` Vlastimil Babka
2025-09-16 15:51   ` Suren Baghdasaryan
2025-09-16 21:11     ` Usama Arif
2025-09-16 21:46       ` Suren Baghdasaryan
2025-09-16 21:52         ` Usama Arif
2025-09-16 22:26           ` Suren Baghdasaryan
2025-09-16 22:27             ` Suren Baghdasaryan
2025-09-17 21:09               ` Usama Arif
2025-09-17 23:04                 ` Suren Baghdasaryan
2025-09-17  7:38             ` Vlastimil Babka
2025-09-17 23:02               ` Suren Baghdasaryan

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=20250915171112.f71a7606a7f9fd3054662bed@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=00107082@163.com \
    --cc=hannes@cmpxchg.org \
    --cc=harry.yoo@oracle.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pyyjason@gmail.com \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=souravpanda@google.com \
    --cc=surenb@google.com \
    --cc=usamaarif642@gmail.com \
    --cc=vbabka@suse.cz \
    /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