linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: cl@linux.com, penberg@kernel.org, rientjes@google.com,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Wei Yang <richard.weiyang@gmail.com>
Subject: [PATCH 4/6] mm/slub: rename ALL slabs sysfs
Date: Wed, 17 May 2017 22:11:44 +0800	[thread overview]
Message-ID: <20170517141146.11063-5-richard.weiyang@gmail.com> (raw)
In-Reply-To: <20170517141146.11063-1-richard.weiyang@gmail.com>

Apply the sysfs pattern

    xxx_slabs[[_total]_objects]

to ALL slabs.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/slub.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index f2f751e6cb96..443dacbf214e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4970,11 +4970,11 @@ static ssize_t cpu_slabs_total_objects_show(struct kmem_cache *s, char *buf)
 }
 SLAB_ATTR_RO(cpu_slabs_total_objects);
 
-static ssize_t objects_show(struct kmem_cache *s, char *buf)
+static ssize_t slabs_objects_show(struct kmem_cache *s, char *buf)
 {
 	return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS);
 }
-SLAB_ATTR_RO(objects);
+SLAB_ATTR_RO(slabs_objects);
 
 static ssize_t objects_partial_show(struct kmem_cache *s, char *buf)
 {
@@ -5069,11 +5069,11 @@ static ssize_t slabs_show(struct kmem_cache *s, char *buf)
 }
 SLAB_ATTR_RO(slabs);
 
-static ssize_t total_objects_show(struct kmem_cache *s, char *buf)
+static ssize_t slabs_total_objects_show(struct kmem_cache *s, char *buf)
 {
 	return show_slab_objects(s, buf, SO_ALL|SO_TOTAL);
 }
-SLAB_ATTR_RO(total_objects);
+SLAB_ATTR_RO(slabs_total_objects);
 
 static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf)
 {
@@ -5362,7 +5362,7 @@ static struct attribute *slab_attrs[] = {
 	&order_attr.attr,
 	&min_partial_attr.attr,
 	&cpu_partial_attr.attr,
-	&objects_attr.attr,
+	&slabs_objects_attr.attr,
 	&objects_partial_attr.attr,
 	&total_objects_partial_attr.attr,
 	&partial_attr.attr,
@@ -5379,7 +5379,7 @@ static struct attribute *slab_attrs[] = {
 	&reserved_attr.attr,
 	&slabs_cpu_partial_attr.attr,
 #ifdef CONFIG_SLUB_DEBUG
-	&total_objects_attr.attr,
+	&slabs_total_objects_attr.attr,
 	&slabs_attr.attr,
 	&sanity_checks_attr.attr,
 	&trace_attr.attr,
-- 
2.11.0

  parent reply	other threads:[~2017-05-17 14:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 14:11 [PATCH 0/6] refine and rename slub sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 1/6] mm/slub: add total_objects_partial sysfs Wei Yang
2017-05-17 14:50   ` Christoph Lameter
2017-05-17 14:11 ` [PATCH 2/6] mm/slub: not include cpu_partial data in cpu_slabs sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 3/6] mm/slub: add cpu_slabs_[total_]objects sysfs Wei Yang
2017-05-17 14:11 ` Wei Yang [this message]
2017-05-17 14:11 ` [PATCH 5/6] mm/slub: rename partial_slabs sysfs Wei Yang
2017-05-17 14:11 ` [PATCH 6/6] mm/slub: rename cpu_partial_slab sysfs Wei Yang
2017-05-17 14:57 ` [PATCH 0/6] refine and rename slub sysfs Christoph Lameter
2017-05-18  9:06 ` Michal Hocko
2017-05-23  3:27   ` Wei Yang
2017-05-23  6:39     ` Michal Hocko
2017-05-23 16:07       ` Christoph Lameter
2017-05-24  9:54       ` Wei Yang
2017-05-24 12:03         ` Michal Hocko
2017-05-24 15:21           ` Wei Yang
2017-05-24 16:03             ` Christoph Lameter
2017-05-25  6:49             ` Michal Hocko

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=20170517141146.11063-5-richard.weiyang@gmail.com \
    --to=richard.weiyang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).