diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-05-14 02:41:20 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-05-14 02:41:46 -0400 |
| commit | 2d84e023cb5ec00403ff5d447533c6fd58fcc7ff (patch) | |
| tree | cb10d9a568ebb4be8593821a6f205efedf2f4ddd /kernel/rcutree.h | |
| parent | 9ff00d58a915b6747ba2e843ab2d04c712b4dc32 (diff) | |
| parent | dc36be4419311fd57becdf54bfeef6bd04a6741d (diff) | |
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull the v3.5 RCU tree from Paul E. McKenney:
1) A set of improvements and fixes to the RCU_FAST_NO_HZ feature
(with more on the way for 3.6). Posted to LKML:
https://lkml.org/lkml/2012/4/23/324 (commits 1-3 and 5),
https://lkml.org/lkml/2012/4/16/611 (commit 4),
https://lkml.org/lkml/2012/4/30/390 (commit 6), and
https://lkml.org/lkml/2012/5/4/410 (commit 7, combined with
the other commits for the convenience of the tester).
2) Changes to make rcu_barrier() avoid disrupting execution of CPUs
that have no RCU callbacks. Posted to LKML:
https://lkml.org/lkml/2012/4/23/322.
3) A couple of commits that improve the efficiency of the interaction
between preemptible RCU and the scheduler, these two being all
that survived an abortive attempt to allow preemptible RCU's
__rcu_read_lock() to be inlined. The full set was posted to
LKML at https://lkml.org/lkml/2012/4/14/143, and the first and
third patches of that set remain.
4) Lai Jiangshan's algorithmic implementation of SRCU, which includes
call_srcu() and srcu_barrier(). A major feature of this new
implementation is that synchronize_srcu() no longer disturbs
the execution of other CPUs. This work is based on earlier
implementations by Peter Zijlstra and Paul E. McKenney. Posted to
LKML: https://lkml.org/lkml/2012/2/22/82.
5) A number of miscellaneous bug fixes and improvements which were
posted to LKML at: https://lkml.org/lkml/2012/4/23/353 with
subsequent updates posted to LKML.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/rcutree.h')
| -rw-r--r-- | kernel/rcutree.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index cdd1be0a4072..7f5d138dedf5 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
| @@ -29,18 +29,14 @@ | |||
| 29 | #include <linux/seqlock.h> | 29 | #include <linux/seqlock.h> |
| 30 | 30 | ||
| 31 | /* | 31 | /* |
| 32 | * Define shape of hierarchy based on NR_CPUS and CONFIG_RCU_FANOUT. | 32 | * Define shape of hierarchy based on NR_CPUS, CONFIG_RCU_FANOUT, and |
| 33 | * CONFIG_RCU_FANOUT_LEAF. | ||
| 33 | * In theory, it should be possible to add more levels straightforwardly. | 34 | * In theory, it should be possible to add more levels straightforwardly. |
| 34 | * In practice, this did work well going from three levels to four. | 35 | * In practice, this did work well going from three levels to four. |
| 35 | * Of course, your mileage may vary. | 36 | * Of course, your mileage may vary. |
| 36 | */ | 37 | */ |
| 37 | #define MAX_RCU_LVLS 4 | 38 | #define MAX_RCU_LVLS 4 |
| 38 | #if CONFIG_RCU_FANOUT > 16 | 39 | #define RCU_FANOUT_1 (CONFIG_RCU_FANOUT_LEAF) |
| 39 | #define RCU_FANOUT_LEAF 16 | ||
| 40 | #else /* #if CONFIG_RCU_FANOUT > 16 */ | ||
| 41 | #define RCU_FANOUT_LEAF (CONFIG_RCU_FANOUT) | ||
| 42 | #endif /* #else #if CONFIG_RCU_FANOUT > 16 */ | ||
| 43 | #define RCU_FANOUT_1 (RCU_FANOUT_LEAF) | ||
| 44 | #define RCU_FANOUT_2 (RCU_FANOUT_1 * CONFIG_RCU_FANOUT) | 40 | #define RCU_FANOUT_2 (RCU_FANOUT_1 * CONFIG_RCU_FANOUT) |
| 45 | #define RCU_FANOUT_3 (RCU_FANOUT_2 * CONFIG_RCU_FANOUT) | 41 | #define RCU_FANOUT_3 (RCU_FANOUT_2 * CONFIG_RCU_FANOUT) |
| 46 | #define RCU_FANOUT_4 (RCU_FANOUT_3 * CONFIG_RCU_FANOUT) | 42 | #define RCU_FANOUT_4 (RCU_FANOUT_3 * CONFIG_RCU_FANOUT) |
| @@ -371,6 +367,17 @@ struct rcu_state { | |||
| 371 | 367 | ||
| 372 | raw_spinlock_t onofflock; /* exclude on/offline and */ | 368 | raw_spinlock_t onofflock; /* exclude on/offline and */ |
| 373 | /* starting new GP. */ | 369 | /* starting new GP. */ |
| 370 | struct rcu_head *orphan_nxtlist; /* Orphaned callbacks that */ | ||
| 371 | /* need a grace period. */ | ||
| 372 | struct rcu_head **orphan_nxttail; /* Tail of above. */ | ||
| 373 | struct rcu_head *orphan_donelist; /* Orphaned callbacks that */ | ||
| 374 | /* are ready to invoke. */ | ||
| 375 | struct rcu_head **orphan_donetail; /* Tail of above. */ | ||
| 376 | long qlen_lazy; /* Number of lazy callbacks. */ | ||
| 377 | long qlen; /* Total number of callbacks. */ | ||
| 378 | struct task_struct *rcu_barrier_in_progress; | ||
| 379 | /* Task doing rcu_barrier(), */ | ||
| 380 | /* or NULL if no barrier. */ | ||
| 374 | raw_spinlock_t fqslock; /* Only one task forcing */ | 381 | raw_spinlock_t fqslock; /* Only one task forcing */ |
| 375 | /* quiescent states. */ | 382 | /* quiescent states. */ |
| 376 | unsigned long jiffies_force_qs; /* Time at which to invoke */ | 383 | unsigned long jiffies_force_qs; /* Time at which to invoke */ |
| @@ -423,7 +430,6 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work); | |||
| 423 | /* Forward declarations for rcutree_plugin.h */ | 430 | /* Forward declarations for rcutree_plugin.h */ |
| 424 | static void rcu_bootup_announce(void); | 431 | static void rcu_bootup_announce(void); |
| 425 | long rcu_batches_completed(void); | 432 | long rcu_batches_completed(void); |
| 426 | static void rcu_preempt_note_context_switch(int cpu); | ||
| 427 | static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp); | 433 | static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp); |
| 428 | #ifdef CONFIG_HOTPLUG_CPU | 434 | #ifdef CONFIG_HOTPLUG_CPU |
| 429 | static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, | 435 | static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, |
| @@ -471,6 +477,7 @@ static void __cpuinit rcu_prepare_kthreads(int cpu); | |||
| 471 | static void rcu_prepare_for_idle_init(int cpu); | 477 | static void rcu_prepare_for_idle_init(int cpu); |
| 472 | static void rcu_cleanup_after_idle(int cpu); | 478 | static void rcu_cleanup_after_idle(int cpu); |
| 473 | static void rcu_prepare_for_idle(int cpu); | 479 | static void rcu_prepare_for_idle(int cpu); |
| 480 | static void rcu_idle_count_callbacks_posted(void); | ||
| 474 | static void print_cpu_stall_info_begin(void); | 481 | static void print_cpu_stall_info_begin(void); |
| 475 | static void print_cpu_stall_info(struct rcu_state *rsp, int cpu); | 482 | static void print_cpu_stall_info(struct rcu_state *rsp, int cpu); |
| 476 | static void print_cpu_stall_info_end(void); | 483 | static void print_cpu_stall_info_end(void); |
