RE: [PATCH 0/2] Improve dump_page() output for slab pages
From: Sukrit.Bhatnagar@xxxxxxxx
Date: Mon May 27 2024 - 06:49:49 EST
Hi Matthew,
On 2024-05-22 23:11, Matthew Wilcox wrote:
> On Wed, May 22, 2024 at 04:46:27PM +0900, Sukrit Bhatnagar wrote:
>> On the other hand, the struct slab has kmem_cache which maintains another set
>> of flags. It would be nice to have these flags added as a part of the debug
>> output, and to have a convenient way to print them.
>
> I don't understand why the slab cache flags are the interesting thing.
> Seems to me it'd be more useful to print slab->slab_cache->name and
> then you'd be able to look up the flags from that, as well as get a lot
> more information.
I agree on printing slab name instead which enables lookup in sysfs
entries etc.
The reason I added the print for kmem_cache flags was because
dump_page() was doing that for folio/page.
Another thing I noticed in the per-slab sysfs (/sys/kernel/slab/$name)
is that we a few entries for kmem_cache flag enabled/disabled output.
There is no entry however which shows all flags.
The slabinfo in proc does not show flag info either.
Is there a need for showing a formatted string of kmem_cache flags in
the sysfs?
Just trying to salvage the %pGs patch in this series, before I have
to discard it... :)
--
Sukrit