mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.com>
To: Yichong Chen <chenyichong@uniontech.com>,
	akpm@linux-foundation.org, Harry Yoo <harry.yoo@oracle.com>
Cc: penberg@cs.helsinki.fi, clameter@sgi.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, SeongJae Park <sj@kernel.org>,
	Hao Li <hao.li@linux.dev>
Subject: Re: [PATCH] tools/mm/slabinfo: fix total_objects attribute name
Date: Thu, 18 Jun 2026 11:18:56 +0200	[thread overview]
Message-ID: <65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com> (raw)
In-Reply-To: <96556748872BB47E+20260612071359.649946-1-chenyichong@uniontech.com>

On 6/12/26 09:13, Yichong Chen wrote:
> SLUB exports the total_objects sysfs attribute, but slabinfo tries to read
> objects_total. As a result, the lookup fails and the field remains zero.
> 
> Use the correct attribute name and rename the corresponding structure
> member to match.
> 
> Fixes: 205ab99dd103 ("slub: Update statistics handling for variable order slabs")

Huh, it has never worked correctly, since 2008.
Applied to slab/for-next, thanks!

> Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
> ---
>  tools/mm/slabinfo.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
> index 54c7265ab52d..f4077746d6df 100644
> --- a/tools/mm/slabinfo.c
> +++ b/tools/mm/slabinfo.c
> @@ -33,7 +33,7 @@ struct slabinfo {
>  	unsigned int hwcache_align, object_size, objs_per_slab;
>  	unsigned int sanity_checks, slab_size, store_user, trace;
>  	int order, poison, reclaim_account, red_zone;
> -	unsigned long partial, objects, slabs, objects_partial, objects_total;
> +	unsigned long partial, objects, slabs, objects_partial, total_objects;
>  	unsigned long alloc_fastpath, alloc_slowpath;
>  	unsigned long free_fastpath, free_slowpath;
>  	unsigned long free_frozen, free_add_partial, free_remove_partial;
> @@ -1263,7 +1263,7 @@ static void read_slab_dir(void)
>  			slab->object_size = get_obj("object_size");
>  			slab->objects = get_obj("objects");
>  			slab->objects_partial = get_obj("objects_partial");
> -			slab->objects_total = get_obj("objects_total");
> +			slab->total_objects = get_obj("total_objects");
>  			slab->objs_per_slab = get_obj("objs_per_slab");
>  			slab->order = get_obj("order");
>  			slab->partial = get_obj("partial");


  parent reply	other threads:[~2026-06-18  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  7:13 Yichong Chen
2026-06-13  0:29 ` SeongJae Park
2026-06-13  5:20   ` Yichong Chen
2026-06-15 12:41   ` Vishal Moola
2026-06-18  9:18 ` Vlastimil Babka [this message]
2026-06-19  5:18   ` Harry Yoo

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=65f68f41-226f-43ae-8bfc-b9a321bfe5fe@suse.com \
    --to=vbabka@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=chenyichong@uniontech.com \
    --cc=clameter@sgi.com \
    --cc=hao.li@linux.dev \
    --cc=harry.yoo@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=sj@kernel.org \
    /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

Powered by JetHome