|
@@ -190,22 +190,6 @@ typedef unsigned int kmem_bufctl_t;
|
|
#define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2)
|
|
#define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2)
|
|
#define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3)
|
|
#define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3)
|
|
|
|
|
|
-/*
|
|
|
|
- * struct slab
|
|
|
|
- *
|
|
|
|
- * Manages the objs in a slab. Placed either at the beginning of mem allocated
|
|
|
|
- * for a slab, or allocated from an general cache.
|
|
|
|
- * Slabs are chained into three list: fully used, partial, fully free slabs.
|
|
|
|
- */
|
|
|
|
-struct slab {
|
|
|
|
- struct list_head list;
|
|
|
|
- unsigned long colouroff;
|
|
|
|
- void *s_mem; /* including colour offset */
|
|
|
|
- unsigned int inuse; /* num of objs active in slab */
|
|
|
|
- kmem_bufctl_t free;
|
|
|
|
- unsigned short nodeid;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* struct slab_rcu
|
|
* struct slab_rcu
|
|
*
|
|
*
|
|
@@ -219,8 +203,6 @@ struct slab {
|
|
*
|
|
*
|
|
* rcu_read_lock before reading the address, then rcu_read_unlock after
|
|
* rcu_read_lock before reading the address, then rcu_read_unlock after
|
|
* taking the spinlock within the structure expected at that address.
|
|
* taking the spinlock within the structure expected at that address.
|
|
- *
|
|
|
|
- * We assume struct slab_rcu can overlay struct slab when destroying.
|
|
|
|
*/
|
|
*/
|
|
struct slab_rcu {
|
|
struct slab_rcu {
|
|
struct rcu_head head;
|
|
struct rcu_head head;
|
|
@@ -228,6 +210,27 @@ struct slab_rcu {
|
|
void *addr;
|
|
void *addr;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * struct slab
|
|
|
|
+ *
|
|
|
|
+ * Manages the objs in a slab. Placed either at the beginning of mem allocated
|
|
|
|
+ * for a slab, or allocated from an general cache.
|
|
|
|
+ * Slabs are chained into three list: fully used, partial, fully free slabs.
|
|
|
|
+ */
|
|
|
|
+struct slab {
|
|
|
|
+ union {
|
|
|
|
+ struct {
|
|
|
|
+ struct list_head list;
|
|
|
|
+ unsigned long colouroff;
|
|
|
|
+ void *s_mem; /* including colour offset */
|
|
|
|
+ unsigned int inuse; /* num of objs active in slab */
|
|
|
|
+ kmem_bufctl_t free;
|
|
|
|
+ unsigned short nodeid;
|
|
|
|
+ };
|
|
|
|
+ struct slab_rcu __slab_cover_slab_rcu;
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* struct array_cache
|
|
* struct array_cache
|
|
*
|
|
*
|