slab: Use page struct fields instead of casting
[platform/adaptation/renesas_rcar/renesas_kernel.git] / include / linux / mm_types.h
index 26574c7..680a5e4 100644 (file)
@@ -53,7 +53,7 @@ struct page {
        struct {
                union {
                        pgoff_t index;          /* Our offset within mapping. */
-                       void *freelist;         /* slub first free object */
+                       void *freelist;         /* slub/slob first free object */
                };
 
                union {
@@ -81,11 +81,12 @@ struct page {
                                         */
                                        atomic_t _mapcount;
 
-                                       struct {
+                                       struct { /* SLUB */
                                                unsigned inuse:16;
                                                unsigned objects:15;
                                                unsigned frozen:1;
                                        };
+                                       int units;      /* SLOB */
                                };
                                atomic_t _count;                /* Usage count, see below. */
                        };
@@ -107,6 +108,12 @@ struct page {
                        short int pobjects;
 #endif
                };
+
+               struct list_head list;  /* slobs list of pages */
+               struct {                /* slab fields */
+                       struct kmem_cache *slab_cache;
+                       struct slab *slab_page;
+               };
        };
 
        /* Remainder is not double word aligned */
@@ -345,17 +352,6 @@ struct mm_struct {
        /* Architecture-specific MM context */
        mm_context_t context;
 
-       /* Swap token stuff */
-       /*
-        * Last value of global fault stamp as seen by this process.
-        * In other words, this value gives an indication of how long
-        * it has been since this task got the token.
-        * Look at mm/thrash.c
-        */
-       unsigned int faultstamp;
-       unsigned int token_priority;
-       unsigned int last_interval;
-
        unsigned long flags; /* Must use atomic bitops to access the bits */
 
        struct core_state *core_state; /* coredumping support */