From: Christoph Lameter <cl@linux.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: David Rientjes <rientjes@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: tj@kernel.org
Cc: Metathronius Galabant <m.galabant@googlemail.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Adrian Drzewiecki <z@drze.net>
Cc: linux-kernel@vger.kernel.org
Subject: [slub p3 7/7] slub: update slabinfo tools to report per cpu partial list statistics
Date: Mon, 01 Aug 2011 11:28:30 -0500 [thread overview]
Message-ID: <20110801162852.988010328@linux.com> (raw)
In-Reply-To: 20110801162823.755182213@linux.com
[-- Attachment #1: update_slabinfo_cp --]
[-- Type: text/plain, Size: 1808 bytes --]
Update the slabinfo tool to report the stats on per cpu partial list usage.
Signed-off-by: Christoph Lameter <cl@linux.com>
---
tools/slub/slabinfo.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux-2.6/tools/slub/slabinfo.c
===================================================================
--- linux-2.6.orig/tools/slub/slabinfo.c 2011-08-01 11:03:01.275859455 -0500
+++ linux-2.6/tools/slub/slabinfo.c 2011-08-01 11:04:45.125858790 -0500
@@ -42,6 +42,7 @@ struct slabinfo {
unsigned long deactivate_remote_frees, order_fallback;
unsigned long cmpxchg_double_cpu_fail, cmpxchg_double_fail;
unsigned long alloc_node_mismatch, deactivate_bypass;
+ unsigned long cpu_partial_alloc, cpu_partial_free;
int numa[MAX_NODES];
int numa_partial[MAX_NODES];
} slabinfo[MAX_SLABS];
@@ -455,6 +456,11 @@ static void slab_stats(struct slabinfo *
s->alloc_from_partial * 100 / total_alloc,
s->free_remove_partial * 100 / total_free);
+ printf("Cpu partial list %8lu %8lu %3lu %3lu\n",
+ s->cpu_partial_alloc, s->cpu_partial_free,
+ s->cpu_partial_alloc * 100 / total_alloc,
+ s->cpu_partial_free * 100 / total_free);
+
printf("RemoteObj/SlabFrozen %8lu %8lu %3lu %3lu\n",
s->deactivate_remote_frees, s->free_frozen,
s->deactivate_remote_frees * 100 / total_alloc,
@@ -1209,6 +1215,8 @@ static void read_slab_dir(void)
slab->order_fallback = get_obj("order_fallback");
slab->cmpxchg_double_cpu_fail = get_obj("cmpxchg_double_cpu_fail");
slab->cmpxchg_double_fail = get_obj("cmpxchg_double_fail");
+ slab->cpu_partial_alloc = get_obj("cpu_partial_alloc");
+ 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");
chdir("..");
next prev parent reply other threads:[~2011-08-01 16:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 16:28 [slub p3 0/7] SLUB: [RFC] Per cpu partial lists V3 Christoph Lameter
2011-08-01 16:28 ` [slub p3 1/7] slub: free slabs without holding locks (V2) Christoph Lameter
2011-08-01 16:28 ` [slub p3 2/7] slub: Remove useless statements in __slab_alloc Christoph Lameter
2011-08-01 16:28 ` [slub p3 3/7] slub: Prepare inuse field in new_slab() Christoph Lameter
2011-08-01 16:28 ` [slub p3 4/7] slub: pass kmem_cache_cpu pointer to get_partial() Christoph Lameter
2011-08-01 16:28 ` [slub p3 5/7] slub: return object pointer from get_partial() / new_slab() Christoph Lameter
2011-08-01 16:28 ` [slub p3 6/7] slub: per cpu cache for partial pages Christoph Lameter
2011-08-02 17:24 ` Christoph Lameter
2011-08-01 16:28 ` Christoph Lameter [this message]
2011-08-02 4:15 ` [slub p3 0/7] SLUB: [RFC] Per cpu partial lists V3 David Rientjes
2011-08-02 14:10 ` Christoph Lameter
2011-08-02 16:37 ` David Rientjes
2011-08-02 16:47 ` 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=20110801162852.988010328@linux.com \
--to=cl@linux.com \
--cc=penberg@cs.helsinki.fi \
--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