mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
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 <[email protected]> CC: Christoph Lameter <[email protected]> CC: David Rientjes <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
bcee6e2a13
commit
0d7561c61d
4 changed files with 57 additions and 27 deletions
16
mm/slab.h
16
mm/slab.h
|
|
@ -49,8 +49,22 @@ int __kmem_cache_shutdown(struct kmem_cache *);
|
|||
|
||||
struct seq_file;
|
||||
struct file;
|
||||
int slabinfo_show(struct seq_file *m, void *p);
|
||||
|
||||
struct slabinfo {
|
||||
unsigned long active_objs;
|
||||
unsigned long num_objs;
|
||||
unsigned long active_slabs;
|
||||
unsigned long num_slabs;
|
||||
unsigned long shared_avail;
|
||||
unsigned int limit;
|
||||
unsigned int batchcount;
|
||||
unsigned int shared;
|
||||
unsigned int objects_per_slab;
|
||||
unsigned int cache_order;
|
||||
};
|
||||
|
||||
void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
|
||||
void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
|
||||
ssize_t slabinfo_write(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *ppos);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue