Re: [PATCH 1/2] tools/mm/slabinfo: refactor slab attribute reading

From: Seongjun Hong

Date: Mon Oct 05 2026 - 06:43:56 EST


Hi Harry, thanks for the detailed review and some nice ideas!
I'll address the comments and prepare a v2.

On Mon, Sep 28, 2026 at 04:52:08PM +0100, Harry Yoo wrote:
> Would you please separate this patch into multiple patches?
> It's hard to review when multiple refactorings are done in a single
> patch.

Sure.

> > + * Deprecated files:
> > + * No STAT_ATTR()/SLAB_ATTR() for these exists in mm/slub.c's
> > + * slab_attrs[] anymore.
>
> This part of the comment looks fine, but
>
> > Although cpu_slabs remains as a file,
> > + * it is also outdated and always prints 0. Keep these for backward
> > + * compatibility, but they should be removed later.
>
> This doesn't seem useful information to put in the comment.
>
> We were able to remove some files when
> Documentation/ABI/testing/sysfs-kernel-slab says
> "Available when CONFIG_SLUB_STATS is enabled", because that implies that
> those files may not exist.
>
> But it's not the case for files like cpu_slabs,
> and I don't think we're going to remove them in the future.
>
> Probably simply say something like
>
> "Deprecated files: the kernel does not create those files anymore or
> always prints hardecoded "0" since they are deprecated" ?

I agree. That sounds better.

--
Seongjun Hong