]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - mm/slab.h
UBUNTU: Ubuntu-raspi2-4.10.0-1000.1
[mirror_ubuntu-zesty-kernel.git] / mm / slab.h
index bc05fdc3edce106b12e5113ad8c8777de6de217d..de6579dc362c861079575a508da5d52387d6dd06 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -142,11 +142,26 @@ static inline unsigned long kmem_cache_flags(unsigned long object_size,
 #define SLAB_CACHE_FLAGS (0)
 #endif
 
+/* Common flags available with current configuration */
 #define CACHE_CREATE_MASK (SLAB_CORE_FLAGS | SLAB_DEBUG_FLAGS | SLAB_CACHE_FLAGS)
 
+/* Common flags permitted for kmem_cache_create */
+#define SLAB_FLAGS_PERMITTED (SLAB_CORE_FLAGS | \
+                             SLAB_RED_ZONE | \
+                             SLAB_POISON | \
+                             SLAB_STORE_USER | \
+                             SLAB_TRACE | \
+                             SLAB_CONSISTENCY_CHECKS | \
+                             SLAB_MEM_SPREAD | \
+                             SLAB_NOLEAKTRACE | \
+                             SLAB_RECLAIM_ACCOUNT | \
+                             SLAB_TEMPORARY | \
+                             SLAB_NOTRACK | \
+                             SLAB_ACCOUNT)
+
 int __kmem_cache_shutdown(struct kmem_cache *);
 void __kmem_cache_release(struct kmem_cache *);
-int __kmem_cache_shrink(struct kmem_cache *, bool);
+int __kmem_cache_shrink(struct kmem_cache *);
 void slab_kmem_cache_release(struct kmem_cache *);
 
 struct seq_file;
@@ -432,7 +447,8 @@ struct kmem_cache_node {
        struct list_head slabs_partial; /* partial list first, better asm code */
        struct list_head slabs_full;
        struct list_head slabs_free;
-       unsigned long num_slabs;
+       unsigned long total_slabs;      /* length of all slab lists */
+       unsigned long free_slabs;       /* length of free slab list only */
        unsigned long free_objects;
        unsigned int free_limit;
        unsigned int colour_next;       /* Per-node cache coloring */