For cpu slabs, show_slab_objects could display statistics for objects. This patch just adds an entry to reflect it. Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> --- mm/slub.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index c7dddf22829d..f2f751e6cb96 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4958,6 +4958,18 @@ static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf) } SLAB_ATTR_RO(cpu_slabs); +static ssize_t cpu_slabs_objects_show(struct kmem_cache *s, char *buf) +{ + return show_slab_objects(s, buf, SO_CPU|SO_OBJECTS); +} +SLAB_ATTR_RO(cpu_slabs_objects); + +static ssize_t cpu_slabs_total_objects_show(struct kmem_cache *s, char *buf) +{ + return show_slab_objects(s, buf, SO_CPU|SO_TOTAL); +} +SLAB_ATTR_RO(cpu_slabs_total_objects); + static ssize_t objects_show(struct kmem_cache *s, char *buf) { return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS); @@ -5354,6 +5366,8 @@ static struct attribute *slab_attrs[] = { &objects_partial_attr.attr, &total_objects_partial_attr.attr, &partial_attr.attr, + &cpu_slabs_objects_attr.attr, + &cpu_slabs_total_objects_attr.attr, &cpu_slabs_attr.attr, &ctor_attr.attr, &aliases_attr.attr, -- 2.11.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>