]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/mm_types.h
SLUB core
[net-next-2.6.git] / include / linux / mm_types.h
index c3852fd4a1cce59a7d98ceb4b7dcc460d3b0c138..e30687bad07590c11acf6c43debb041d5db89316 100644 (file)
@@ -19,10 +19,16 @@ struct page {
        unsigned long flags;            /* Atomic flags, some possibly
                                         * updated asynchronously */
        atomic_t _count;                /* Usage count, see below. */
-       atomic_t _mapcount;             /* Count of ptes mapped in mms,
+       union {
+               atomic_t _mapcount;     /* Count of ptes mapped in mms,
                                         * to show when page is mapped
                                         * & limit reverse map searches.
                                         */
+               struct {        /* SLUB uses */
+                       short unsigned int inuse;
+                       short unsigned int offset;
+               };
+       };
        union {
            struct {
                unsigned long private;          /* Mapping-private opaque data:
@@ -43,8 +49,15 @@ struct page {
 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
            spinlock_t ptl;
 #endif
+           struct {                    /* SLUB uses */
+               struct page *first_page;        /* Compound pages */
+               struct kmem_cache *slab;        /* Pointer to slab */
+           };
+       };
+       union {
+               pgoff_t index;          /* Our offset within mapping. */
+               void *freelist;         /* SLUB: pointer to free object */
        };
-       pgoff_t index;                  /* Our offset within mapping. */
        struct list_head lru;           /* Pageout list, eg. active_list
                                         * protected by zone->lru_lock !
                                         */