diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-01-26 19:18:07 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-04-18 14:38:17 -0400 |
commit | 9577df9a3122af08fff84b8a1a60dccf524a3891 (patch) | |
tree | 3c5f01e4cbdef694343d839b696a5ecbeb66472f /Documentation/RCU | |
parent | abb06b99484a9f5af05c7147c289faf835f68e8e (diff) |
rcu: Pull rcu_qs_ctr into rcu_dynticks structure
The rcu_qs_ctr variable is yet another isolated per-CPU variable,
so this commit pulls it into the pre-existing rcu_dynticks per-CPU
structure.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r-- | Documentation/RCU/Design/Data-Structures/Data-Structures.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/RCU/Design/Data-Structures/Data-Structures.html b/Documentation/RCU/Design/Data-Structures/Data-Structures.html index bf7f266e8888..3d0311657533 100644 --- a/Documentation/RCU/Design/Data-Structures/Data-Structures.html +++ b/Documentation/RCU/Design/Data-Structures/Data-Structures.html | |||
@@ -1105,6 +1105,7 @@ Its fields are as follows: | |||
1105 | 2 int dynticks_nmi_nesting; | 1105 | 2 int dynticks_nmi_nesting; |
1106 | 3 atomic_t dynticks; | 1106 | 3 atomic_t dynticks; |
1107 | 4 int rcu_sched_qs_mask; | 1107 | 4 int rcu_sched_qs_mask; |
1108 | 5 unsigned long rcu_qs_ctr; | ||
1108 | </pre> | 1109 | </pre> |
1109 | 1110 | ||
1110 | <p>The <tt>->dynticks_nesting</tt> field counts the | 1111 | <p>The <tt>->dynticks_nesting</tt> field counts the |
@@ -1123,12 +1124,19 @@ CPU's transitions to and from dyntick-idle mode, so that this counter | |||
1123 | has an even value when the CPU is in dyntick-idle mode and an odd | 1124 | has an even value when the CPU is in dyntick-idle mode and an odd |
1124 | value otherwise. | 1125 | value otherwise. |
1125 | 1126 | ||
1126 | </p><p>Finally, the <tt>->rcu_sched_qs_mask</tt> field is used | 1127 | </p><p>The <tt>->rcu_sched_qs_mask</tt> field is used |
1127 | to record the fact that the RCU core code would really like to | 1128 | to record the fact that the RCU core code would really like to |
1128 | see a quiescent state from the corresponding CPU. | 1129 | see a quiescent state from the corresponding CPU, so much so that |
1130 | it is willing to call for heavy-weight dyntick-counter operations. | ||
1129 | This flag is checked by RCU's context-switch and <tt>cond_resched()</tt> | 1131 | This flag is checked by RCU's context-switch and <tt>cond_resched()</tt> |
1130 | code, which provide a momentary idle sojourn in response. | 1132 | code, which provide a momentary idle sojourn in response. |
1131 | 1133 | ||
1134 | </p><p>Finally the <tt>->rcu_qs_ctr</tt> field is used to record | ||
1135 | quiescent states from <tt>cond_resched()</tt>. | ||
1136 | Because <tt>cond_resched()</tt> can execute quite frequently, this | ||
1137 | must be quite lightweight, as in a non-atomic increment of this | ||
1138 | per-CPU field. | ||
1139 | |||
1132 | <table> | 1140 | <table> |
1133 | <tr><th> </th></tr> | 1141 | <tr><th> </th></tr> |
1134 | <tr><th align="left">Quick Quiz:</th></tr> | 1142 | <tr><th align="left">Quick Quiz:</th></tr> |