diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-02-18 19:39:09 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-02-26 15:03:01 -0500 |
commit | 5afff48bdf7481570c9385a8a674a81ffb8f09ee (patch) | |
tree | ed5c3a224b7227e9055d0a6e5afab49d4c26571c /kernel/rcu | |
parent | 4bb3c5f4142a359de46cf14ebab64c4c903d6773 (diff) |
rcu: Update from rcu_expedited variable to rcu_gp_is_expedited()
This commit updates open-coded tests of the rcu_expedited variable
to instead use rcu_gp_is_expedited().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/srcu.c | 2 | ||||
-rw-r--r-- | kernel/rcu/tree.c | 9 | ||||
-rw-r--r-- | kernel/rcu/tree_plugin.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index 445bf8ffe3fb..c871f07eff69 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c | |||
@@ -507,7 +507,7 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount) | |||
507 | */ | 507 | */ |
508 | void synchronize_srcu(struct srcu_struct *sp) | 508 | void synchronize_srcu(struct srcu_struct *sp) |
509 | { | 509 | { |
510 | __synchronize_srcu(sp, rcu_expedited | 510 | __synchronize_srcu(sp, rcu_gp_is_expedited() |
511 | ? SYNCHRONIZE_SRCU_EXP_TRYCOUNT | 511 | ? SYNCHRONIZE_SRCU_EXP_TRYCOUNT |
512 | : SYNCHRONIZE_SRCU_TRYCOUNT); | 512 | : SYNCHRONIZE_SRCU_TRYCOUNT); |
513 | } | 513 | } |
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 48d640ca1a05..4325fbe79d84 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -2954,7 +2954,7 @@ void synchronize_sched(void) | |||
2954 | "Illegal synchronize_sched() in RCU-sched read-side critical section"); | 2954 | "Illegal synchronize_sched() in RCU-sched read-side critical section"); |
2955 | if (rcu_blocking_is_gp()) | 2955 | if (rcu_blocking_is_gp()) |
2956 | return; | 2956 | return; |
2957 | if (rcu_expedited) | 2957 | if (rcu_gp_is_expedited()) |
2958 | synchronize_sched_expedited(); | 2958 | synchronize_sched_expedited(); |
2959 | else | 2959 | else |
2960 | wait_rcu_gp(call_rcu_sched); | 2960 | wait_rcu_gp(call_rcu_sched); |
@@ -2981,7 +2981,7 @@ void synchronize_rcu_bh(void) | |||
2981 | "Illegal synchronize_rcu_bh() in RCU-bh read-side critical section"); | 2981 | "Illegal synchronize_rcu_bh() in RCU-bh read-side critical section"); |
2982 | if (rcu_blocking_is_gp()) | 2982 | if (rcu_blocking_is_gp()) |
2983 | return; | 2983 | return; |
2984 | if (rcu_expedited) | 2984 | if (rcu_gp_is_expedited()) |
2985 | synchronize_rcu_bh_expedited(); | 2985 | synchronize_rcu_bh_expedited(); |
2986 | else | 2986 | else |
2987 | wait_rcu_gp(call_rcu_bh); | 2987 | wait_rcu_gp(call_rcu_bh); |
@@ -3660,11 +3660,12 @@ static int rcu_pm_notify(struct notifier_block *self, | |||
3660 | case PM_HIBERNATION_PREPARE: | 3660 | case PM_HIBERNATION_PREPARE: |
3661 | case PM_SUSPEND_PREPARE: | 3661 | case PM_SUSPEND_PREPARE: |
3662 | if (nr_cpu_ids <= 256) /* Expediting bad for large systems. */ | 3662 | if (nr_cpu_ids <= 256) /* Expediting bad for large systems. */ |
3663 | rcu_expedited = 1; | 3663 | rcu_expedite_gp(); |
3664 | break; | 3664 | break; |
3665 | case PM_POST_HIBERNATION: | 3665 | case PM_POST_HIBERNATION: |
3666 | case PM_POST_SUSPEND: | 3666 | case PM_POST_SUSPEND: |
3667 | rcu_expedited = 0; | 3667 | if (nr_cpu_ids <= 256) /* Expediting bad for large systems. */ |
3668 | rcu_unexpedite_gp(); | ||
3668 | break; | 3669 | break; |
3669 | default: | 3670 | default: |
3670 | break; | 3671 | break; |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 0a571e9a0f1d..63726b734d34 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -585,7 +585,7 @@ void synchronize_rcu(void) | |||
585 | "Illegal synchronize_rcu() in RCU read-side critical section"); | 585 | "Illegal synchronize_rcu() in RCU read-side critical section"); |
586 | if (!rcu_scheduler_active) | 586 | if (!rcu_scheduler_active) |
587 | return; | 587 | return; |
588 | if (rcu_expedited) | 588 | if (rcu_gp_is_expedited()) |
589 | synchronize_rcu_expedited(); | 589 | synchronize_rcu_expedited(); |
590 | else | 590 | else |
591 | wait_rcu_gp(call_rcu); | 591 | wait_rcu_gp(call_rcu); |