From: Harry Yoo <harry@kernel.org>
To: Xuewen Wang <wangxuewen_ky@163.com>
Cc: vbabka@kernel.org, hao.li@linux.dev, cl@gentwo.org,
rientjes@google.com, akpm@linux-foundation.org,
david@kernel.org, rppt@kernel.org, mhocko@suse.com,
surenb@google.com, sj@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Xuewen Wang <wangxuewen@kylinos.cn>
Subject: Re: [PATCH v1 2/2] tools/mm: slabinfo: preserve the average partial object count
Date: Wed, 2 Dec 2026 18:25:52 +0000 [thread overview]
Message-ID: <axBiXO9nPgiPMZJ4@thinkstation> (raw)
In-Reply-To: <20261118060317.1802620-3-wangxuewen_ky@163.com>
On Wed, Nov 18, 2026 at 02:03:17PM +0800, Xuewen Wang wrote:
> From: Xuewen Wang <wangxuewen@kylinos.cn>
>
> totals() calculates avg_partobj as total_partobj / used_slabs, but then
> overwrites it with total_partobj * 100 / total_objects. Consequently,
> the PartObjs Average column of -T and -X reports a percentage instead
> of an object count per cache.
>
> Remove the second assignment. The aggregate partial-object percentage
> is already calculated where it is printed, and avg_ppartobj separately
> holds the average per-cache percentage.
>
> Fixes: c09d87517298 ("slub: add slabinfo tool")
> Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>
> ---
Looks good to me,
Acked-by: Harry Yoo (Meta) <harry@kernel.org>
--
Cheers,
Harry / Hyeonggon
prev parent reply other threads:[~2026-12-02 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 6:03 [PATCH v1 0/2] tools/mm: slabinfo: fix inverted sorting and totals Xuewen Wang
2026-11-18 6:03 ` [PATCH v1 1/2] tools/mm: slabinfo: fix inverted numeric sorting Xuewen Wang
2026-12-02 18:24 ` Harry Yoo
2026-11-18 6:03 ` [PATCH v1 2/2] tools/mm: slabinfo: preserve the average partial object count Xuewen Wang
2026-12-02 18:25 ` Harry Yoo [this message]
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=axBiXO9nPgiPMZJ4@thinkstation \
--to=harry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=david@kernel.org \
--cc=hao.li@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=wangxuewen@kylinos.cn \
--cc=wangxuewen_ky@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.