diff options
Diffstat (limited to 'include/linux/slub_def.h')
-rw-r--r-- | include/linux/slub_def.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index ddb1a706b144..5e6d3d634d5b 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -11,12 +11,35 @@ | |||
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | 13 | ||
14 | enum stat_item { | ||
15 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | ||
16 | ALLOC_SLOWPATH, /* Allocation by getting a new cpu slab */ | ||
17 | FREE_FASTPATH, /* Free to cpu slub */ | ||
18 | FREE_SLOWPATH, /* Freeing not to cpu slab */ | ||
19 | FREE_FROZEN, /* Freeing to frozen slab */ | ||
20 | FREE_ADD_PARTIAL, /* Freeing moves slab to partial list */ | ||
21 | FREE_REMOVE_PARTIAL, /* Freeing removes last object */ | ||
22 | ALLOC_FROM_PARTIAL, /* Cpu slab acquired from partial list */ | ||
23 | ALLOC_SLAB, /* Cpu slab acquired from page allocator */ | ||
24 | ALLOC_REFILL, /* Refill cpu slab from slab freelist */ | ||
25 | FREE_SLAB, /* Slab freed to the page allocator */ | ||
26 | CPUSLAB_FLUSH, /* Abandoning of the cpu slab */ | ||
27 | DEACTIVATE_FULL, /* Cpu slab was full when deactivated */ | ||
28 | DEACTIVATE_EMPTY, /* Cpu slab was empty when deactivated */ | ||
29 | DEACTIVATE_TO_HEAD, /* Cpu slab was moved to the head of partials */ | ||
30 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ | ||
31 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ | ||
32 | NR_SLUB_STAT_ITEMS }; | ||
33 | |||
14 | struct kmem_cache_cpu { | 34 | struct kmem_cache_cpu { |
15 | void **freelist; /* Pointer to first free per cpu object */ | 35 | void **freelist; /* Pointer to first free per cpu object */ |
16 | struct page *page; /* The slab from which we are allocating */ | 36 | struct page *page; /* The slab from which we are allocating */ |
17 | int node; /* The node of the page (or -1 for debug) */ | 37 | int node; /* The node of the page (or -1 for debug) */ |
18 | unsigned int offset; /* Freepointer offset (in word units) */ | 38 | unsigned int offset; /* Freepointer offset (in word units) */ |
19 | unsigned int objsize; /* Size of an object (from kmem_cache) */ | 39 | unsigned int objsize; /* Size of an object (from kmem_cache) */ |
40 | #ifdef CONFIG_SLUB_STATS | ||
41 | unsigned stat[NR_SLUB_STAT_ITEMS]; | ||
42 | #endif | ||
20 | }; | 43 | }; |
21 | 44 | ||
22 | struct kmem_cache_node { | 45 | struct kmem_cache_node { |