Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[firefly-linux-kernel-4.4.55.git] / include / linux / mm_types.h
index 07c8bd3f7b48b97d1a25430508053407c15bd46b..199a03aab8dc9c8053f74fd04b99e39a774aa6be 100644 (file)
@@ -28,6 +28,8 @@ struct mem_cgroup;
                IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
 #define ALLOC_SPLIT_PTLOCKS    (SPINLOCK_SIZE > BITS_PER_LONG/8)
 
+typedef void compound_page_dtor(struct page *);
+
 /*
  * Each physical page in the system has a struct page associated with
  * it to keep track of whatever it is we are using the page for at the
@@ -142,6 +144,12 @@ struct page {
                struct rcu_head rcu_head;       /* Used by SLAB
                                                 * when destroying via RCU
                                                 */
+               /* First tail page of compound page */
+               struct {
+                       compound_page_dtor *compound_dtor;
+                       unsigned long compound_order;
+               };
+
 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && USE_SPLIT_PMD_PTLOCKS
                pgtable_t pmd_huge_pte; /* protected by page->ptl */
 #endif
@@ -355,7 +363,8 @@ struct mm_struct {
        pgd_t * pgd;
        atomic_t mm_users;                      /* How many users with user space? */
        atomic_t mm_count;                      /* How many references to "struct mm_struct" (users count as 1) */
-       atomic_long_t nr_ptes;                  /* Page table pages */
+       atomic_long_t nr_ptes;                  /* PTE page table pages */
+       atomic_long_t nr_pmds;                  /* PMD page table pages */
        int map_count;                          /* number of VMAs */
 
        spinlock_t page_table_lock;             /* Protects page tables and some counters */