summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-02-15 12:31:31 +1100
committerDaniel Black <daniel@mariadb.org>2021-02-25 09:13:10 +1100
commit1635686b509111c10cdb0842a0dabc0ef07bdf56 (patch)
treea5ae0ed17da318b4569b9bded452ee3e9b37ae16 /debian
parent9e259d58c2a898800463d28b175fde0e74ab96d9 (diff)
downloadmariadb-git-1635686b509111c10cdb0842a0dabc0ef07bdf56.tar.gz
MDEV-23510: arm64 lf_hash alignment of pointers
volatile != atomic. volatile has no memory barrier schemantics, its for mmaped IO so lets allow some optimizer gains and stop pretending it helps with memory atomicity. The MDEV lists a SEGV an assumption is made that an address was partially read. As C packs structs strictly in order and on arm64 the cache line size is 128 bits. A pointer (link - 64 bits), followed by a hashnr (uint32 - 32 bits), leaves the following key (uchar * 64 bits), neither naturally aligned to any pointer and worse, split across a cache line which is the processors view of an atomic reservation of memory. lf_dynarray_lvalue is assumed to return a 64 bit aligned address. As a solution move the 32bit hashnr to the end so we don't get the *key pointer split across two cache lines. Tested by: Krunal Bauskar Reviewer: Marko Mäkelä
Diffstat (limited to 'debian')
0 files changed, 0 insertions, 0 deletions