Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcu: Rename struct rcu_data .dynticks_snap into .watching_snap

The context_tracking.state RCU_DYNTICKS subvariable has been renamed to
RCU_WATCHING, and the snapshot helpers are now prefix by
"rcu_watching". Reflect that change into the storage variables for these
snapshots.

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>

authored by

Valentin Schneider and committed by
Neeraj Upadhyay
2dba2230 fc1096ab

+6 -6
+2 -2
Documentation/RCU/Design/Data-Structures/Data-Structures.rst
··· 921 921 922 922 :: 923 923 924 - 1 int dynticks_snap; 924 + 1 int watching_snap; 925 925 2 unsigned long dynticks_fqs; 926 926 927 - The ``->dynticks_snap`` field is used to take a snapshot of the 927 + The ``->watching_snap`` field is used to take a snapshot of the 928 928 corresponding CPU's dyntick-idle state when forcing quiescent states, 929 929 and is therefore accessed from other CPUs. Finally, the 930 930 ``->dynticks_fqs`` field is used to count the number of times this CPU
+3 -3
kernel/rcu/tree.c
··· 793 793 * Ordering between remote CPU's pre idle accesses and post grace period 794 794 * updater's accesses is enforced by the below acquire semantic. 795 795 */ 796 - rdp->dynticks_snap = ct_rcu_watching_cpu_acquire(rdp->cpu); 797 - if (rcu_watching_snap_in_eqs(rdp->dynticks_snap)) { 796 + rdp->watching_snap = ct_rcu_watching_cpu_acquire(rdp->cpu); 797 + if (rcu_watching_snap_in_eqs(rdp->watching_snap)) { 798 798 trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti")); 799 799 rcu_gpnum_ovf(rdp->mynode, rdp); 800 800 return 1; ··· 826 826 * read-side critical section that started before the beginning 827 827 * of the current RCU grace period. 828 828 */ 829 - if (rcu_watching_snap_stopped_since(rdp, rdp->dynticks_snap)) { 829 + if (rcu_watching_snap_stopped_since(rdp, rdp->watching_snap)) { 830 830 trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti")); 831 831 rcu_gpnum_ovf(rnp, rdp); 832 832 return 1;
+1 -1
kernel/rcu/tree.h
··· 206 206 long blimit; /* Upper limit on a processed batch */ 207 207 208 208 /* 3) dynticks interface. */ 209 - int dynticks_snap; /* Per-GP tracking for dynticks. */ 209 + int watching_snap; /* Per-GP tracking for dynticks. */ 210 210 bool rcu_need_heavy_qs; /* GP old, so heavy quiescent state! */ 211 211 bool rcu_urgent_qs; /* GP old need light quiescent state. */ 212 212 bool rcu_forced_tick; /* Forced tick to provide QS. */