From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Pekka Enberg <penberg@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
Matt Mackall <mpm@selenic.com>
Cc: Glauber Costa <glommer@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Joonsoo Kim <js1304@gmail.com>,
David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Wanpeng Li <liwanp@linux.vnet.ibm.com>
Subject: [PATCH 3/3] mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo
Date: Thu, 27 Jun 2013 07:57:39 +0800 [thread overview]
Message-ID: <1372291059-9880-3-git-send-email-liwanp@linux.vnet.ibm.com> (raw)
In-Reply-To: <1372291059-9880-1-git-send-email-liwanp@linux.vnet.ibm.com>
Use existing interface node_nr_slabs and node_nr_objs to get
nr_slabs and nr_objs.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/slub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index e303b04..52098c2 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5287,8 +5287,8 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
if (!n)
continue;
- nr_slabs += atomic_long_read(&n->nr_slabs);
- nr_objs += atomic_long_read(&n->total_objects);
+ nr_slabs += node_nr_slabs(n);
+ nr_objs += node_nr_objs(n);
nr_free += count_partial(n, &nr_inactive, count_free);
nr_inactive_slabs += nr_inactive;
}
--
1.8.1.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-06-26 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 23:57 [PATCH 1/3] mm/slub: Fix slub calculate active slabs uncorrectly Wanpeng Li
2013-06-26 23:57 ` [PATCH 2/3] mm/slub: remove nr_partials Wanpeng Li
2013-06-26 23:57 ` Wanpeng Li [this message]
2013-07-01 18:47 ` [PATCH 3/3] mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo Christoph Lameter
2013-07-01 18:45 ` [PATCH 1/3] mm/slub: Fix slub calculate active slabs uncorrectly Christoph Lameter
2013-07-02 0:03 ` Wanpeng Li
2013-07-02 0:03 ` Wanpeng Li
[not found] ` <51d218df.a77d440a.3cfe.ffffe64aSMTPIN_ADDED_BROKEN@mx.google.com>
2013-07-02 14:15 ` Christoph Lameter
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=1372291059-9880-3-git-send-email-liwanp@linux.vnet.ibm.com \
--to=liwanp@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=glommer@parallels.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--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).