Re: [PATCH RFC tip/core/rcu 3/4] rcu: Make RCU_FAST_NO_HZ account for pauses out of idle

Peter Zijlstra
2012-04-26T15:10:10Z

On Thu, 2012-04-26 at 07:49 -0700, Paul E. McKenney wrote:
> > per_cpu(rcu_dyntick.first_pass, cpu) = 0;

> I must confess that I had no idea that you could say the above. I would
> have expected to have to say the following:
>
> per_cpu(rcu_dyntick, cpu).first_pass = 0;

They both work and are afaik identical. The first takes the per-cpu
address of rcu_dyntick and adds the offset of first_pass, then
transforms the per-cpu address to a linear address. The second
transforms the per-cpu address of rcu_dyntick, transforms it to a linear
address and then adds the offset of first_pass, IOW:

(&rcu_dyntick + offset) + per_cpu_offset ==
(&rcu_dyntick + per_cpu_offset) + offset