* [RFC v1 0/2] slabinfo: sheaves statistics support
@ 2025-04-07 4:18 Harry Yoo
2025-04-07 4:18 ` [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file Harry Yoo
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Harry Yoo @ 2025-04-07 4:18 UTC (permalink / raw)
To: Vlastimil Babka, Christoph Lameter, David Rientjes, linux-mm; +Cc: Harry Yoo
With this series, `slabinfo -r` now prints sheaves statistics (if enabled).
Written on top of slub-percpu-sheaves-v4r0 [1] branch.
Q1: Vlastimil, do you want to integrate this into the sheaves series or do
you want me to send it as a follow-up series after sheaves land mainline?
Q2: 'sheaf_swap' does not fit into the table because SLUB swaps sheaves both
at alloc and free. Probably split the counter?
[1] https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slub-percpu-sheaves-v4r0
$ sudo ./slabinfo -r maple_node
Slabcache: maple_node Aliases: 0 Order : 1 Objects: 8268
[... snip ...]
Slab Perf Counter Alloc Free %Al %Fr
----------------------------------------------
Fastpath 258760 5109 93 3
Slowpath 18205 126605 6 96
Page Alloc 903 520 0 0
Add partial 0 14600 0 11
Remove partial 3472 420 1 0
Cpu partial list 12235 16577 4 12
RemoteObj/SlabFrozen 0 5969 0 4
Total 276965 131714
Slab Sheaves Counter Alloc Free %Al %Fr %Fa
-------------------------------------------------------
Served from sheaves 1805673 580161 86 93 N/A
Sheaves refill 236384 N/A 13 N/A N/A
Sheaves alloc 3872 3794 0 0 N/A
Free to RCU sheaves N/A 1255815 N/A 68 0
Main sheaf flush N/A 0 N/A 0 N/A
Other sheaves flush N/A 265600 N/A 14 N/A
Slab Deactivation Occurrences %
-------------------------------------------
Slab full 0 0%
Slab empty 100 0%
Moved to head of partial list 0 0%
Moved to tail of partial list 0 0%
Deactivation bypass 16588 99%
Refilled from foreign frees 1595 9%
Node mismatch 0 0%
Harry Yoo (2):
mm/slab: add sheaves_enabled read-only sysfs file
tools/mm/slabinfo: add support for sheaves stats
mm/slub.c | 10 ++++++++
tools/mm/slabinfo.c | 62 +++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 70 insertions(+), 2 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file
2025-04-07 4:18 [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
@ 2025-04-07 4:18 ` Harry Yoo
2025-04-09 2:45 ` David Rientjes
2025-04-07 4:18 ` [RFC v1 2/2] tools/mm/slabinfo: add support for sheaves stats Harry Yoo
2025-04-07 4:37 ` [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2 siblings, 1 reply; 9+ messages in thread
From: Harry Yoo @ 2025-04-07 4:18 UTC (permalink / raw)
To: Vlastimil Babka, Christoph Lameter, David Rientjes, linux-mm; +Cc: Harry Yoo
For user-space tools like slabinfo, it is difficult to determine whether
a cache has sheaves enabled. Expose a read-only 'sheaves_enabled' sysfs
file to indicate whether sheaves are enabled for a given cache.
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
---
mm/slub.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mm/slub.c b/mm/slub.c
index b5ea66cbbe68..32db440a8b05 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -8504,6 +8504,15 @@ static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s,
SLAB_ATTR(remote_node_defrag_ratio);
#endif
+static ssize_t sheaves_enabled_show(struct kmem_cache *s, char *buf)
+{
+ if (s->cpu_sheaves)
+ return sysfs_emit(buf, "%u\n", 1);
+ else
+ return sysfs_emit(buf, "%u\n", 0);
+}
+SLAB_ATTR_RO(sheaves_enabled);
+
#ifdef CONFIG_SLUB_STATS
static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si)
{
@@ -8656,6 +8665,7 @@ static struct attribute *slab_attrs[] = {
#ifdef CONFIG_NUMA
&remote_node_defrag_ratio_attr.attr,
#endif
+ &sheaves_enabled_attr.attr,
#ifdef CONFIG_SLUB_STATS
&alloc_cpu_sheaf_attr.attr,
&alloc_fastpath_attr.attr,
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC v1 2/2] tools/mm/slabinfo: add support for sheaves stats
2025-04-07 4:18 [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2025-04-07 4:18 ` [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file Harry Yoo
@ 2025-04-07 4:18 ` Harry Yoo
2025-04-07 4:37 ` [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2 siblings, 0 replies; 9+ messages in thread
From: Harry Yoo @ 2025-04-07 4:18 UTC (permalink / raw)
To: Vlastimil Babka, Christoph Lameter, David Rientjes, linux-mm; +Cc: Harry Yoo
Add sheaves stats support to the slabinfo tool to make it easier to
investigate sheaves statistics.
"Served from sheaves" indicates the number of allocations and frees that
were served from sheaves, out of the total number of allocations and
frees (including those not using sheaves).
The other sheaves statistics reflect only the number of events among
allocations and frees that were served from sheaves.
Before:
$ sudo ./slabinfo -r maple_node
Slabcache: maple_node Aliases: 0 Order : 1 Objects: 8433
[... snip ...]
Slab Perf Counter Alloc Free %Al %Fr
--------------------------------------------------
Fastpath 177539 3150 94 4
Slowpath 10841 72067 5 95
Page Alloc 903 519 0 0
Add partial 0 8729 0 11
Remove partial 2007 420 1 0
Cpu partial list 7124 9999 3 13
RemoteObj/SlabFrozen 0 3041 0 4
Total 188380 75217
Slab Deactivation Occurrences %
-------------------------------------------------
Slab full 0 0%
Slab empty 99 0%
Moved to head of partial list 0 0%
Moved to tail of partial list 0 0%
Deactivation bypass 10012 99%
Refilled from foreign frees 807 7%
Node mismatch 0 0%
After:
$ sudo ./slabinfo -r maple_node
Slabcache: maple_node Aliases: 0 Order : 1 Objects: 8268
[... snip ...]
Slab Perf Counter Alloc Free %Al %Fr
----------------------------------------------
Fastpath 258760 5109 93 3
Slowpath 18205 126605 6 96
Page Alloc 903 520 0 0
Add partial 0 14600 0 11
Remove partial 3472 420 1 0
Cpu partial list 12235 16577 4 12
RemoteObj/SlabFrozen 0 5969 0 4
Total 276965 131714
Slab Sheaves Counter Alloc Free %Al %Fr %Fa
-------------------------------------------------------
Served from sheaves 1805673 580161 86 93 N/A
Sheaves refill 236384 N/A 13 N/A N/A
Sheaves alloc 3872 3794 0 0 N/A
Free to RCU sheaves N/A 1255815 N/A 68 0
Main sheaf flush N/A 0 N/A 0 N/A
Other sheaves flush N/A 265600 N/A 14 N/A
Slab Deactivation Occurrences %
-------------------------------------------
Slab full 0 0%
Slab empty 100 0%
Moved to head of partial list 0 0%
Moved to tail of partial list 0 0%
Deactivation bypass 16588 99%
Refilled from foreign frees 1595 9%
Node mismatch 0 0%
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
---
tools/mm/slabinfo.c | 62 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 60 insertions(+), 2 deletions(-)
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 1433eff99feb..c930b2135b33 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -44,6 +44,12 @@ struct slabinfo {
unsigned long cmpxchg_double_cpu_fail, cmpxchg_double_fail;
unsigned long alloc_node_mismatch, deactivate_bypass;
unsigned long cpu_partial_alloc, cpu_partial_free;
+ unsigned int sheaves_enabled;
+ unsigned long alloc_cpu_sheaf, free_cpu_sheaf;
+ unsigned long free_rcu_sheaf, free_rcu_sheaf_fail;
+ unsigned long sheaf_flush_main, sheaf_flush_other;
+ unsigned long sheaf_refill, sheaf_swap;
+ unsigned long sheaf_alloc, sheaf_free;
int numa[MAX_NODES];
int numa_partial[MAX_NODES];
} slabinfo[MAX_SLABS];
@@ -472,6 +478,7 @@ static void slab_stats(struct slabinfo *s)
unsigned long total_alloc;
unsigned long total_free;
unsigned long total;
+ const char *not_avail = "N/A";
if (!s->alloc_slab)
return;
@@ -484,7 +491,7 @@ static void slab_stats(struct slabinfo *s)
printf("\n");
printf("Slab Perf Counter Alloc Free %%Al %%Fr\n");
- printf("--------------------------------------------------\n");
+ printf("----------------------------------------------\n");
printf("Fastpath %8lu %8lu %3lu %3lu\n",
s->alloc_fastpath, s->free_fastpath,
s->alloc_fastpath * 100 / total_alloc,
@@ -525,9 +532,47 @@ static void slab_stats(struct slabinfo *s)
total = s->deactivate_full + s->deactivate_empty +
s->deactivate_to_head + s->deactivate_to_tail + s->deactivate_bypass;
+ if (s->sheaves_enabled) {
+ unsigned long sheaves_total_alloc = s->alloc_cpu_sheaf;
+ unsigned long sheaves_total_free = s->free_cpu_sheaf + s->free_rcu_sheaf;
+
+ total_alloc += sheaves_total_alloc;
+ total_free += sheaves_total_free;
+
+ printf("\n");
+ printf("Slab Sheaves Counter Alloc Free %%Al %%Fr %%Fa\n");
+ printf("-------------------------------------------------------\n");
+ printf("Served from sheaves %8lu %8lu %4lu %4lu %4s\n",
+ s->alloc_cpu_sheaf, s->free_cpu_sheaf,
+ total_alloc ? sheaves_total_alloc * 100 / total_alloc : 0,
+ total_free ? sheaves_total_free * 100 / total_free : 0,
+ not_avail);
+ printf("Sheaves refill %8lu %8s %4lu %4s %4s\n",
+ s->sheaf_refill, not_avail,
+ sheaves_total_alloc ? s->sheaf_refill * 100 / sheaves_total_alloc : 0,
+ not_avail, not_avail);
+ printf("Sheaves alloc %8lu %8lu %4lu %4lu %4s\n",
+ s->sheaf_alloc, s->sheaf_free,
+ sheaves_total_alloc ? s->sheaf_alloc * 100 / sheaves_total_alloc : 0,
+ sheaves_total_free ? s->sheaf_free * 100 / sheaves_total_free : 0,
+ not_avail);
+ printf("Free to RCU sheaves %8s %8lu %4s %4lu %4lu\n",
+ not_avail, s->free_rcu_sheaf, not_avail,
+ sheaves_total_free ? s->free_rcu_sheaf * 100 / sheaves_total_free : 0,
+ s->free_rcu_sheaf ? s->free_rcu_sheaf_fail * 100 / s->free_rcu_sheaf : 0);
+ printf("Main sheaf flush %8s %8lu %4s %4lu %4s\n",
+ not_avail, s->sheaf_flush_main, not_avail,
+ sheaves_total_free ? s->sheaf_flush_main * 100 / sheaves_total_free : 0,
+ not_avail);
+ printf("Other sheaves flush %8s %8lu %4s %4lu %4s\n",
+ not_avail, s->sheaf_flush_other, not_avail,
+ sheaves_total_free ? s->sheaf_flush_other * 100 / sheaves_total_free : 0,
+ not_avail);
+ }
+
if (total) {
printf("\nSlab Deactivation Occurrences %%\n");
- printf("-------------------------------------------------\n");
+ printf("-------------------------------------------\n");
printf("Slab full %7lu %3lu%%\n",
s->deactivate_full, (s->deactivate_full * 100) / total);
printf("Slab empty %7lu %3lu%%\n",
@@ -1301,6 +1346,19 @@ static void read_slab_dir(void)
slab->cpu_partial_free = get_obj("cpu_partial_free");
slab->alloc_node_mismatch = get_obj("alloc_node_mismatch");
slab->deactivate_bypass = get_obj("deactivate_bypass");
+ slab->sheaves_enabled = get_obj("sheaves_enabled");
+ if (slab->sheaves_enabled) {
+ slab->alloc_cpu_sheaf = get_obj("alloc_cpu_sheaf");
+ slab->free_cpu_sheaf = get_obj("free_cpu_sheaf");
+ slab->free_rcu_sheaf = get_obj("free_rcu_sheaf");
+ slab->free_rcu_sheaf_fail = get_obj("free_rcu_sheaf_fail");
+ slab->sheaf_flush_main = get_obj("sheaf_flush_main");
+ slab->sheaf_flush_other = get_obj("sheaf_flush_other");
+ slab->sheaf_refill = get_obj("sheaf_refill");
+ slab->sheaf_swap = get_obj("sheaf_swap");
+ slab->sheaf_alloc = get_obj("sheaf_alloc");
+ slab->sheaf_free = get_obj("sheaf_free");
+ }
if (chdir(".."))
fatal("Unable to chdir from slab ../%s\n",
slab->name);
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 0/2] slabinfo: sheaves statistics support
2025-04-07 4:18 [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2025-04-07 4:18 ` [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file Harry Yoo
2025-04-07 4:18 ` [RFC v1 2/2] tools/mm/slabinfo: add support for sheaves stats Harry Yoo
@ 2025-04-07 4:37 ` Harry Yoo
2025-04-23 14:28 ` Vlastimil Babka
2 siblings, 1 reply; 9+ messages in thread
From: Harry Yoo @ 2025-04-07 4:37 UTC (permalink / raw)
To: Vlastimil Babka, Christoph Lameter, David Rientjes, linux-mm
On Mon, Apr 07, 2025 at 01:18:08PM +0900, Harry Yoo wrote:
> With this series, `slabinfo -r` now prints sheaves statistics (if enabled).
> Written on top of slub-percpu-sheaves-v4r0 [1] branch.
>
> Q1: Vlastimil, do you want to integrate this into the sheaves series or do
> you want me to send it as a follow-up series after sheaves land mainline?
>
> Q2: 'sheaf_swap' does not fit into the table because SLUB swaps sheaves both
> at alloc and free. Probably split the counter?
Q3: Having 'Add sheaves to the barn' & 'Remove sheaves from the barn' counters
might help better understand the behavior? (just like 'Add partial' /
'Remove partial' pair in the normal SLUB path).
--
Cheers,
Harry (formerly known as Hyeonggon)
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slub-percpu-sheaves-v4r0
>
> $ sudo ./slabinfo -r maple_node
> Slabcache: maple_node Aliases: 0 Order : 1 Objects: 8268
>
> [... snip ...]
>
> Slab Perf Counter Alloc Free %Al %Fr
> ----------------------------------------------
> Fastpath 258760 5109 93 3
> Slowpath 18205 126605 6 96
> Page Alloc 903 520 0 0
> Add partial 0 14600 0 11
> Remove partial 3472 420 1 0
> Cpu partial list 12235 16577 4 12
> RemoteObj/SlabFrozen 0 5969 0 4
> Total 276965 131714
>
>
> Slab Sheaves Counter Alloc Free %Al %Fr %Fa
> -------------------------------------------------------
> Served from sheaves 1805673 580161 86 93 N/A
> Sheaves refill 236384 N/A 13 N/A N/A
> Sheaves alloc 3872 3794 0 0 N/A
> Free to RCU sheaves N/A 1255815 N/A 68 0
> Main sheaf flush N/A 0 N/A 0 N/A
> Other sheaves flush N/A 265600 N/A 14 N/A
>
> Slab Deactivation Occurrences %
> -------------------------------------------
> Slab full 0 0%
> Slab empty 100 0%
> Moved to head of partial list 0 0%
> Moved to tail of partial list 0 0%
> Deactivation bypass 16588 99%
> Refilled from foreign frees 1595 9%
> Node mismatch 0 0%
>
> Harry Yoo (2):
> mm/slab: add sheaves_enabled read-only sysfs file
> tools/mm/slabinfo: add support for sheaves stats
>
> mm/slub.c | 10 ++++++++
> tools/mm/slabinfo.c | 62 +++++++++++++++++++++++++++++++++++++++++++--
> 2 files changed, 70 insertions(+), 2 deletions(-)
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file
2025-04-07 4:18 ` [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file Harry Yoo
@ 2025-04-09 2:45 ` David Rientjes
2025-04-10 22:32 ` Harry Yoo
0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2025-04-09 2:45 UTC (permalink / raw)
To: Harry Yoo; +Cc: Vlastimil Babka, Christoph Lameter, linux-mm
On Mon, 7 Apr 2025, Harry Yoo wrote:
> For user-space tools like slabinfo, it is difficult to determine whether
> a cache has sheaves enabled. Expose a read-only 'sheaves_enabled' sysfs
> file to indicate whether sheaves are enabled for a given cache.
>
Thoughts on adding an entry to Documentation/ABI/testing/sysfs-kernel-slab
for this one?
> Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
> ---
> mm/slub.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index b5ea66cbbe68..32db440a8b05 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -8504,6 +8504,15 @@ static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s,
> SLAB_ATTR(remote_node_defrag_ratio);
> #endif
>
> +static ssize_t sheaves_enabled_show(struct kmem_cache *s, char *buf)
> +{
> + if (s->cpu_sheaves)
> + return sysfs_emit(buf, "%u\n", 1);
> + else
> + return sysfs_emit(buf, "%u\n", 0);
> +}
> +SLAB_ATTR_RO(sheaves_enabled);
> +
> #ifdef CONFIG_SLUB_STATS
> static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si)
> {
> @@ -8656,6 +8665,7 @@ static struct attribute *slab_attrs[] = {
> #ifdef CONFIG_NUMA
> &remote_node_defrag_ratio_attr.attr,
> #endif
> + &sheaves_enabled_attr.attr,
> #ifdef CONFIG_SLUB_STATS
> &alloc_cpu_sheaf_attr.attr,
> &alloc_fastpath_attr.attr,
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file
2025-04-09 2:45 ` David Rientjes
@ 2025-04-10 22:32 ` Harry Yoo
2025-04-23 14:24 ` Vlastimil Babka
0 siblings, 1 reply; 9+ messages in thread
From: Harry Yoo @ 2025-04-10 22:32 UTC (permalink / raw)
To: David Rientjes; +Cc: Vlastimil Babka, Christoph Lameter, linux-mm
On Tue, Apr 08, 2025 at 07:45:38PM -0700, David Rientjes wrote:
> On Mon, 7 Apr 2025, Harry Yoo wrote:
>
> > For user-space tools like slabinfo, it is difficult to determine whether
> > a cache has sheaves enabled. Expose a read-only 'sheaves_enabled' sysfs
> > file to indicate whether sheaves are enabled for a given cache.
> >
>
> Thoughts on adding an entry to Documentation/ABI/testing/sysfs-kernel-slab
> for this one?
That makes sense, thanks!
New stats added by the sheaves series should also be there.
...By the way I'm a bit unsure about the name.
'sheaves', 'has_sheaves' or 'sheaves_enabled'?
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file
2025-04-10 22:32 ` Harry Yoo
@ 2025-04-23 14:24 ` Vlastimil Babka
0 siblings, 0 replies; 9+ messages in thread
From: Vlastimil Babka @ 2025-04-23 14:24 UTC (permalink / raw)
To: Harry Yoo, David Rientjes; +Cc: Christoph Lameter, linux-mm
On 4/11/25 00:32, Harry Yoo wrote:
> On Tue, Apr 08, 2025 at 07:45:38PM -0700, David Rientjes wrote:
>> On Mon, 7 Apr 2025, Harry Yoo wrote:
>>
>> > For user-space tools like slabinfo, it is difficult to determine whether
>> > a cache has sheaves enabled. Expose a read-only 'sheaves_enabled' sysfs
>> > file to indicate whether sheaves are enabled for a given cache.
>> >
>>
>> Thoughts on adding an entry to Documentation/ABI/testing/sysfs-kernel-slab
>> for this one?
>
> That makes sense, thanks!
>
> New stats added by the sheaves series should also be there.
>
> ...By the way I'm a bit unsure about the name.
> 'sheaves', 'has_sheaves' or 'sheaves_enabled'?
How about reporting sheaf_capacity isntead?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 0/2] slabinfo: sheaves statistics support
2025-04-07 4:37 ` [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
@ 2025-04-23 14:28 ` Vlastimil Babka
2025-04-25 8:16 ` Harry Yoo
0 siblings, 1 reply; 9+ messages in thread
From: Vlastimil Babka @ 2025-04-23 14:28 UTC (permalink / raw)
To: Harry Yoo, Christoph Lameter, David Rientjes, linux-mm
On 4/7/25 06:37, Harry Yoo wrote:
> On Mon, Apr 07, 2025 at 01:18:08PM +0900, Harry Yoo wrote:
>> With this series, `slabinfo -r` now prints sheaves statistics (if enabled).
>> Written on top of slub-percpu-sheaves-v4r0 [1] branch.
Thanks!
>> Q1: Vlastimil, do you want to integrate this into the sheaves series or do
>> you want me to send it as a follow-up series after sheaves land mainline?
I think it's fine to do patch 2 a follow-up. As for patch 1 I will instead
export sheaf_capacity as part of the initial support.
>> Q2: 'sheaf_swap' does not fit into the table because SLUB swaps sheaves both
>> at alloc and free. Probably split the counter?
I'm considering just dropping it instead as it's not that useful as a
measure of caching efficiency? Probably sheaf_flush_main also doesn't need
to be a separate counter as it only happens in corner cases.
Due to ABI becoming set in stone we should be conservative.
> Q3: Having 'Add sheaves to the barn' & 'Remove sheaves from the barn' counters
> might help better understand the behavior? (just like 'Add partial' /
> 'Remove partial' pair in the normal SLUB path).
Yeah that could make more sense instead I think,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC v1 0/2] slabinfo: sheaves statistics support
2025-04-23 14:28 ` Vlastimil Babka
@ 2025-04-25 8:16 ` Harry Yoo
0 siblings, 0 replies; 9+ messages in thread
From: Harry Yoo @ 2025-04-25 8:16 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: Christoph Lameter, David Rientjes, linux-mm
On Wed, Apr 23, 2025 at 04:28:59PM +0200, Vlastimil Babka wrote:
> On 4/7/25 06:37, Harry Yoo wrote:
> > On Mon, Apr 07, 2025 at 01:18:08PM +0900, Harry Yoo wrote:
> >> With this series, `slabinfo -r` now prints sheaves statistics (if enabled).
> >> Written on top of slub-percpu-sheaves-v4r0 [1] branch.
>
> Thanks!
>
> >> Q1: Vlastimil, do you want to integrate this into the sheaves series or do
> >> you want me to send it as a follow-up series after sheaves land mainline?
>
> I think it's fine to do patch 2 a follow-up.
Alright.
> As for patch 1 I will instead
> export sheaf_capacity as part of the initial support.
Thanks! 'sheaf_capacity' sounds fine to me.
> >> Q2: 'sheaf_swap' does not fit into the table because SLUB swaps sheaves both
> >> at alloc and free. Probably split the counter?
>
> I'm considering just dropping it instead as it's not that useful as a
> measure of caching efficiency? Probably sheaf_flush_main also doesn't need
> to be a separate counter as it only happens in corner cases.
No strong opinion from me.
Not adding it will be fine as we can add it later if needed.
> Due to ABI becoming set in stone we should be conservative.
Agreed.
> > Q3: Having 'Add sheaves to the barn' & 'Remove sheaves from the barn' counters
> > might help better understand the behavior? (just like 'Add partial' /
> > 'Remove partial' pair in the normal SLUB path).
>
> Yeah that could make more sense instead I think,
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-04-25 8:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-07 4:18 [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2025-04-07 4:18 ` [RFC v1 1/2] mm/slab: add sheaves_enabled read-only sysfs file Harry Yoo
2025-04-09 2:45 ` David Rientjes
2025-04-10 22:32 ` Harry Yoo
2025-04-23 14:24 ` Vlastimil Babka
2025-04-07 4:18 ` [RFC v1 2/2] tools/mm/slabinfo: add support for sheaves stats Harry Yoo
2025-04-07 4:37 ` [RFC v1 0/2] slabinfo: sheaves statistics support Harry Yoo
2025-04-23 14:28 ` Vlastimil Babka
2025-04-25 8:16 ` Harry Yoo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox