On Thu, 10 Jul 2014, Pranith Kumar wrote:

> > Correct.
>
> I understand one of the advantage of using these per cpu variables is
> avoiding disabling interrupts. But what happens when this cpu is
> preempted? The new processor will be working on the other cpu
> variables, but without barriers will it see the latest values?

The this_cpu ops are atomic vs preemption. So you will always get the
value of the current processor. If preemption occurs then then instruction
will get the per cpu data from the new processor.

I cannot post to [email protected]. Some moderator approval
is required. Can you fix that?


_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to