aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.h
diff options
context:
space:
mode:
authorGlauber Costa <glommer@parallels.com>2012-10-19 10:20:27 -0400
committerPekka Enberg <penberg@kernel.org>2012-10-24 02:39:16 -0400
commit0d7561c61d76690ed84bd1016acc0fcbff063205 (patch)
tree90870a84e7568020921d01300e73cc607410ff47 /mm/slab.h
parentbcee6e2a13d580f6c21d748fcd7239ccc66cb4b8 (diff)
sl[au]b: Process slabinfo_show in common code
With all the infrastructure in place, we can now have slabinfo_show done from slab_common.c. A cache-specific function is called to grab information about the cache itself, since that is still heavily dependent on the implementation. But with the values produced by it, all the printing and handling is done from common code. Signed-off-by: Glauber Costa <glommer@parallels.com> CC: Christoph Lameter <cl@linux.com> CC: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 3442eb83ee1e..5a43c2f13621 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -49,8 +49,22 @@ int __kmem_cache_shutdown(struct kmem_cache *);
49 49
50struct seq_file; 50struct seq_file;
51struct file; 51struct file;
52int slabinfo_show(struct seq_file *m, void *p);
53 52
53struct slabinfo {
54 unsigned long active_objs;
55 unsigned long num_objs;
56 unsigned long active_slabs;
57 unsigned long num_slabs;
58 unsigned long shared_avail;
59 unsigned int limit;
60 unsigned int batchcount;
61 unsigned int shared;
62 unsigned int objects_per_slab;
63 unsigned int cache_order;
64};
65
66void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
67void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
54ssize_t slabinfo_write(struct file *file, const char __user *buffer, 68ssize_t slabinfo_write(struct file *file, const char __user *buffer,
55 size_t count, loff_t *ppos); 69 size_t count, loff_t *ppos);
56#endif 70#endif