]> Pileus Git - ~andy/linux/blobdiff - kernel/rcutree.h
Merge remote-tracking branch 'tip/smp/hotplug' into next.2012.09.25b
[~andy/linux] / kernel / rcutree.h
index 1224d4c053823fe7ecdbc2bab9590779c5cc9b7c..7576fd4d8ce62854ee13a48089ac6811a7b11e25 100644 (file)
@@ -196,6 +196,7 @@ struct rcu_node {
                                /* Refused to boost: not sure why, though. */
                                /*  This can happen due to race conditions. */
 #endif /* #ifdef CONFIG_RCU_BOOST */
+       raw_spinlock_t fqslock ____cacheline_internodealigned_in_smp;
 } ____cacheline_internodealigned_in_smp;
 
 /*
@@ -239,8 +240,6 @@ struct rcu_data {
                                        /*  in order to detect GP end. */
        unsigned long   gpnum;          /* Highest gp number that this CPU */
                                        /*  is aware of having started. */
-       unsigned long   passed_quiesce_gpnum;
-                                       /* gpnum at time of quiescent state. */
        bool            passed_quiesce; /* User-mode/idle loop etc. */
        bool            qs_pending;     /* Core waits for quiesc state. */
        bool            beenonline;     /* CPU online at least once. */
@@ -306,11 +305,13 @@ struct rcu_data {
        unsigned long n_rp_cpu_needs_gp;
        unsigned long n_rp_gp_completed;
        unsigned long n_rp_gp_started;
-       unsigned long n_rp_need_fqs;
        unsigned long n_rp_need_nothing;
 
-       /* 6) _rcu_barrier() callback. */
+       /* 6) _rcu_barrier() and OOM callbacks. */
        struct rcu_head barrier_head;
+#ifdef CONFIG_RCU_FAST_NO_HZ
+       struct rcu_head oom_head;
+#endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
 
        int cpu;
        struct rcu_state *rsp;
@@ -369,20 +370,17 @@ struct rcu_state {
 
        u8      fqs_state ____cacheline_internodealigned_in_smp;
                                                /* Force QS state. */
-       u8      fqs_active;                     /* force_quiescent_state() */
-                                               /*  is running. */
-       u8      fqs_need_gp;                    /* A CPU was prevented from */
-                                               /*  starting a new grace */
-                                               /*  period because */
-                                               /*  force_quiescent_state() */
-                                               /*  was running. */
        u8      boost;                          /* Subject to priority boost. */
        unsigned long gpnum;                    /* Current gp number. */
        unsigned long completed;                /* # of last completed gp. */
+       struct task_struct *gp_kthread;         /* Task for grace periods. */
+       wait_queue_head_t gp_wq;                /* Where GP task waits. */
+       int gp_flags;                           /* Commands for GP task. */
 
        /* End of fields guarded by root rcu_node's lock. */
 
-       raw_spinlock_t onofflock;               /* exclude on/offline and */
+       raw_spinlock_t onofflock ____cacheline_internodealigned_in_smp;
+                                               /* exclude on/offline and */
                                                /*  starting new GP. */
        struct rcu_head *orphan_nxtlist;        /* Orphaned callbacks that */
                                                /*  need a grace period. */
@@ -392,16 +390,11 @@ struct rcu_state {
        struct rcu_head **orphan_donetail;      /* Tail of above. */
        long qlen_lazy;                         /* Number of lazy callbacks. */
        long qlen;                              /* Total number of callbacks. */
-       struct task_struct *rcu_barrier_in_progress;
-                                               /* Task doing rcu_barrier(), */
-                                               /*  or NULL if no barrier. */
        struct mutex barrier_mutex;             /* Guards barrier fields. */
        atomic_t barrier_cpu_count;             /* # CPUs waiting on. */
        struct completion barrier_completion;   /* Wake at barrier end. */
        unsigned long n_barrier_done;           /* ++ at start and end of */
                                                /*  _rcu_barrier(). */
-       raw_spinlock_t fqslock;                 /* Only one task forcing */
-                                               /*  quiescent states. */
        unsigned long jiffies_force_qs;         /* Time at which to invoke */
                                                /*  force_quiescent_state(). */
        unsigned long n_force_qs;               /* Number of calls to */
@@ -420,6 +413,10 @@ struct rcu_state {
        struct list_head flavors;               /* List of RCU flavors. */
 };
 
+/* Values for rcu_state structure's gp_flags field. */
+#define RCU_GP_FLAG_INIT 0x1   /* Need grace-period initialization. */
+#define RCU_GP_FLAG_FQS  0x2   /* Need grace-period quiescent-state forcing. */
+
 extern struct list_head rcu_struct_flavors;
 #define for_each_rcu_flavor(rsp) \
        list_for_each_entry((rsp), &rcu_struct_flavors, flavors)