Re: dcache locking question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2019-03-16 at 17:50 -0700, Paul E. McKenney wrote:
[...]
>  I -have- seen stores of constant values be torn, but not stores of
> runtime-variable values and not loads.  Still, such tearing is
> permitted, and including the READ_ONCE() is making it easier for
> things like thread sanitizers.  In addition, the READ_ONCE() makes it
> clear that the value being loaded is unstable, which can be
> useful documentation.

Um, just so I'm clear, because this assumption permeates all our code: 
load or store tearing can never occur if we're doing load or store of a
32 bit value which is naturally aligned.  Where naturally aligned is
within the gift of the CPU to determine but which the compiler or
kernel will always ensure for us unless we pack the structure or
deliberately misalign the allocation.

James




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux