diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-04-29 19:14:46 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-05-01 17:26:51 -0400 |
commit | f715e6f15ee167026581a8a2e09b2ed644b974aa (patch) | |
tree | 5a91e9eb1a72e992759b6ddf8eeb9c4ac68c3b52 | |
parent | 0121c619d03820d965745e56f80f6eb5994533fe (diff) |
slabinfo: Support printout of the number of fallbacks
Add functionality to slabinfo to print out the number of fallbacks
that have occurred for each slab cache when the -D option is specified.
Also widen the allocation / free field since the numbers became
too big after a week.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r-- | Documentation/vm/slabinfo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index d3ce295bffac..e4230ed16ee7 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c | |||
@@ -38,7 +38,7 @@ struct slabinfo { | |||
38 | unsigned long alloc_from_partial, alloc_slab, free_slab, alloc_refill; | 38 | unsigned long alloc_from_partial, alloc_slab, free_slab, alloc_refill; |
39 | unsigned long cpuslab_flush, deactivate_full, deactivate_empty; | 39 | unsigned long cpuslab_flush, deactivate_full, deactivate_empty; |
40 | unsigned long deactivate_to_head, deactivate_to_tail; | 40 | unsigned long deactivate_to_head, deactivate_to_tail; |
41 | unsigned long deactivate_remote_frees; | 41 | unsigned long deactivate_remote_frees, order_fallback; |
42 | int numa[MAX_NODES]; | 42 | int numa[MAX_NODES]; |
43 | int numa_partial[MAX_NODES]; | 43 | int numa_partial[MAX_NODES]; |
44 | } slabinfo[MAX_SLABS]; | 44 | } slabinfo[MAX_SLABS]; |
@@ -293,7 +293,7 @@ int line = 0; | |||
293 | void first_line(void) | 293 | void first_line(void) |
294 | { | 294 | { |
295 | if (show_activity) | 295 | if (show_activity) |
296 | printf("Name Objects Alloc Free %%Fast\n"); | 296 | printf("Name Objects Alloc Free %%Fast Fallb O\n"); |
297 | else | 297 | else |
298 | printf("Name Objects Objsize Space " | 298 | printf("Name Objects Objsize Space " |
299 | "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n"); | 299 | "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n"); |
@@ -573,11 +573,12 @@ void slabcache(struct slabinfo *s) | |||
573 | total_alloc = s->alloc_fastpath + s->alloc_slowpath; | 573 | total_alloc = s->alloc_fastpath + s->alloc_slowpath; |
574 | total_free = s->free_fastpath + s->free_slowpath; | 574 | total_free = s->free_fastpath + s->free_slowpath; |
575 | 575 | ||
576 | printf("%-21s %8ld %8ld %8ld %3ld %3ld \n", | 576 | printf("%-21s %8ld %10ld %10ld %3ld %3ld %5ld %1d\n", |
577 | s->name, s->objects, | 577 | s->name, s->objects, |
578 | total_alloc, total_free, | 578 | total_alloc, total_free, |
579 | total_alloc ? (s->alloc_fastpath * 100 / total_alloc) : 0, | 579 | total_alloc ? (s->alloc_fastpath * 100 / total_alloc) : 0, |
580 | total_free ? (s->free_fastpath * 100 / total_free) : 0); | 580 | total_free ? (s->free_fastpath * 100 / total_free) : 0, |
581 | s->order_fallback, s->order); | ||
581 | } | 582 | } |
582 | else | 583 | else |
583 | printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n", | 584 | printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n", |
@@ -1188,6 +1189,7 @@ void read_slab_dir(void) | |||
1188 | slab->deactivate_to_head = get_obj("deactivate_to_head"); | 1189 | slab->deactivate_to_head = get_obj("deactivate_to_head"); |
1189 | slab->deactivate_to_tail = get_obj("deactivate_to_tail"); | 1190 | slab->deactivate_to_tail = get_obj("deactivate_to_tail"); |
1190 | slab->deactivate_remote_frees = get_obj("deactivate_remote_frees"); | 1191 | slab->deactivate_remote_frees = get_obj("deactivate_remote_frees"); |
1192 | slab->order_fallback = get_obj("order_fallback"); | ||
1191 | chdir(".."); | 1193 | chdir(".."); |
1192 | if (slab->name[0] == ':') | 1194 | if (slab->name[0] == ':') |
1193 | alias_targets++; | 1195 | alias_targets++; |