|
@@ -239,3 +239,35 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
|
|
|
return s;
|
|
|
}
|
|
|
#endif
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * The slab lists for all objects.
|
|
|
+ */
|
|
|
+struct kmem_cache_node {
|
|
|
+ spinlock_t list_lock;
|
|
|
+
|
|
|
+#ifdef CONFIG_SLAB
|
|
|
+ struct list_head slabs_partial; /* partial list first, better asm code */
|
|
|
+ struct list_head slabs_full;
|
|
|
+ struct list_head slabs_free;
|
|
|
+ unsigned long free_objects;
|
|
|
+ unsigned int free_limit;
|
|
|
+ unsigned int colour_next; /* Per-node cache coloring */
|
|
|
+ struct array_cache *shared; /* shared per node */
|
|
|
+ struct array_cache **alien; /* on other nodes */
|
|
|
+ unsigned long next_reap; /* updated without locking */
|
|
|
+ int free_touched; /* updated without locking */
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef CONFIG_SLUB
|
|
|
+ unsigned long nr_partial;
|
|
|
+ struct list_head partial;
|
|
|
+#ifdef CONFIG_SLUB_DEBUG
|
|
|
+ atomic_long_t nr_slabs;
|
|
|
+ atomic_long_t total_objects;
|
|
|
+ struct list_head full;
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+};
|