Skip to content

Commit 00943a6

Browse files
weiyang-linuxpaulmckrcu
authored andcommitted
rcu: gp_max is protected by root rcu_node's lock
Because gp_max is protected by root rcu_node's lock, this commit moves the gp_max definition to the region of the rcu_node structure containing fields protected by this lock. Signed-off-by: Wei Yang <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c6dfd72 commit 00943a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/rcu/tree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ struct rcu_state {
302302
u8 boost ____cacheline_internodealigned_in_smp;
303303
/* Subject to priority boost. */
304304
unsigned long gp_seq; /* Grace-period sequence #. */
305+
unsigned long gp_max; /* Maximum GP duration in */
306+
/* jiffies. */
305307
struct task_struct *gp_kthread; /* Task for grace periods. */
306308
struct swait_queue_head gp_wq; /* Where GP task waits. */
307309
short gp_flags; /* Commands for GP task. */
@@ -347,8 +349,6 @@ struct rcu_state {
347349
/* a reluctant CPU. */
348350
unsigned long n_force_qs_gpstart; /* Snapshot of n_force_qs at */
349351
/* GP start. */
350-
unsigned long gp_max; /* Maximum GP duration in */
351-
/* jiffies. */
352352
const char *name; /* Name of structure. */
353353
char abbr; /* Abbreviated name. */
354354

0 commit comments

Comments
 (0)