lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] percpu: add data dependency barrier in percpu accessors and operations
On Tue, Jul 15, 2014 at 09:06:00AM -0500, Christoph Lameter wrote:
> On Tue, 15 Jul 2014, Paul E. McKenney wrote:
>
> > If I understand your initialization procedure correctly, you need at least
> > an smp_wmb() on the update side and at least an smp_read_barrier_depends()
> > on the read side.
>
> A barrier for data that is not in the cache of the read side? That has
> not been accessed yet (well there could have been a free_percpu before but
> if so then the cache line was evicted by the initialization code).

http://www.openvms.compaq.com/wizard/wiz_2637.html

Besides which, if you don't have barriers on the initialization side,
then both the CPU and the compiler are free to update the pointer before
completing the initialization, which can leave old stuff still in other
CPUs' caches for long enough to break you.

Thanx, Paul



\
 
 \ /
  Last update: 2014-07-15 17:41    [W:0.082 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site