Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / include / linux / mm_types.h
index 6a7a1083b6fb796d89d47beba775b3dd57255c3f..2222fa795284183344d603c5286fcfd8c40dffa3 100644 (file)
@@ -25,7 +25,6 @@
 
 struct address_space;
 struct mem_cgroup;
-struct hmm;
 
 /*
  * Each physical page in the system has a struct page associated with
@@ -139,6 +138,7 @@ struct page {
                struct {        /* Second tail page of compound page */
                        unsigned long _compound_pad_1;  /* compound_head */
                        unsigned long _compound_pad_2;
+                       /* For both global and memcg */
                        struct list_head deferred_list;
                };
                struct {        /* Page table pages */
@@ -383,6 +383,16 @@ struct mm_struct {
                unsigned long highest_vm_end;   /* highest vma end address */
                pgd_t * pgd;
 
+#ifdef CONFIG_MEMBARRIER
+               /**
+                * @membarrier_state: Flags controlling membarrier behavior.
+                *
+                * This field is close to @pgd to hopefully fit in the same
+                * cache-line, which needs to be touched by switch_mm().
+                */
+               atomic_t membarrier_state;
+#endif
+
                /**
                 * @mm_users: The number of users including userspace.
                 *
@@ -452,9 +462,7 @@ struct mm_struct {
                unsigned long flags; /* Must use atomic bitops to access */
 
                struct core_state *core_state; /* coredumping support */
-#ifdef CONFIG_MEMBARRIER
-               atomic_t membarrier_state;
-#endif
+
 #ifdef CONFIG_AIO
                spinlock_t                      ioctx_lock;
                struct kioctx_table __rcu       *ioctx_table;
@@ -511,11 +519,6 @@ struct mm_struct {
                atomic_long_t hugetlb_usage;
 #endif
                struct work_struct async_put_work;
-
-#ifdef CONFIG_HMM_MIRROR
-               /* HMM needs to track a few things per mm */
-               struct hmm *hmm;
-#endif
        } __randomize_layout;
 
        /*