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

From: Peter Zijlstra
Date: Thu Apr 26 2012 - 11:10:07 EST


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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/