]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/slub_def.h
Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release
[linux-2.6-omap-h63xx.git] / include / linux / slub_def.h
index 3b361b2906bdb563b6a082b214ff8b9bd0cb1e73..ddb1a706b144036dd1805eac5baa66784adbbc29 100644 (file)
 #include <linux/workqueue.h>
 #include <linux/kobject.h>
 
+struct kmem_cache_cpu {
+       void **freelist;        /* Pointer to first free per cpu object */
+       struct page *page;      /* The slab from which we are allocating */
+       int node;               /* The node of the page (or -1 for debug) */
+       unsigned int offset;    /* Freepointer offset (in word units) */
+       unsigned int objsize;   /* Size of an object (from kmem_cache) */
+};
+
 struct kmem_cache_node {
        spinlock_t list_lock;   /* Protect partial list and nr_partial */
        unsigned long nr_partial;
@@ -41,7 +49,7 @@ struct kmem_cache {
        /* Allocation and freeing of slabs */
        int objects;            /* Number of objects in slab */
        int refcount;           /* Refcount for slab cache destroy */
-       void (*ctor)(void *, struct kmem_cache *, unsigned long);
+       void (*ctor)(struct kmem_cache *, void *);
        int inuse;              /* Offset to metadata */
        int align;              /* Alignment */
        const char *name;       /* Name (only for display!) */
@@ -51,10 +59,17 @@ struct kmem_cache {
 #endif
 
 #ifdef CONFIG_NUMA
-       int defrag_ratio;
+       /*
+        * Defragmentation by allocating from a remote node.
+        */
+       int remote_node_defrag_ratio;
        struct kmem_cache_node *node[MAX_NUMNODES];
 #endif
-       struct page *cpu_slab[NR_CPUS];
+#ifdef CONFIG_SMP
+       struct kmem_cache_cpu *cpu_slab[NR_CPUS];
+#else
+       struct kmem_cache_cpu cpu_slab;
+#endif
 };
 
 /*