Re: Word-at-a-time dcache name accesses (was Re: .. anybody know of any filesystems that depend on the exact VFS 'namehash' implementation?)

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

 



On Fri, Mar 2, 2012 at 4:17 PM,  <david@xxxxxxx> wrote:
>
> or did some CPUs have efficient char access, but inefficient unaligned word
> access?

Tons of CPU's have efficient char accesses but horrible unaligned word
accesses. Some are even outright buggy (ie at least some ARM cores)
and load crap. Others take a fault.

They just aren't x86, because x86 has traditionally had code with a
fair amount of unaligned loads and stores (and not just for historical
reasons either: even modern code replaces constant-sized memcpy() etc
with direct loads and stores)

For some other architectures, we could just use "get_unaligned()",
which fixes things up for them. I could have made that explicit, even
if it doesn't matter on x86.

So the bigger portability problem to some degree is the fact that it
is limited to little-endian, so even if you have a CPU with good
unaligned accesses (some POWER chips do ok, for example, although not
all), you'd have to also do something with the mask generation (which
currently uses the "(x-1)&~x" trick that means that it generates the
mask of the *low bits* - and then assumes that "low bits" means "first
bytes" - ie little endian).

                       Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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