diff options
author | Sverker Eriksson <[email protected]> | 2014-06-11 18:22:05 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-06-11 18:22:05 +0200 |
commit | 6db23381adb9c580e1d03cccf2a8b67c6cc5189b (patch) | |
tree | 2f3704bed6936969ee213c419f4a0d3ab02b6908 /erts/emulator/beam/erl_db_hash.h | |
parent | 07b8f441ca711f9812fad9e9115bab3c3aa92f79 (diff) | |
download | otp-6db23381adb9c580e1d03cccf2a8b67c6cc5189b.tar.gz otp-6db23381adb9c580e1d03cccf2a8b67c6cc5189b.tar.bz2 otp-6db23381adb9c580e1d03cccf2a8b67c6cc5189b.zip |
erts: Fix cache alignment for ETS write_concurrency locks
Effects if sizeof(erts_smp_rwmtx_t) > 64:
+ Better performance due to less false sharing
- Increased memory footprint per table
Diffstat (limited to 'erts/emulator/beam/erl_db_hash.h')
-rw-r--r-- | erts/emulator/beam/erl_db_hash.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_db_hash.h b/erts/emulator/beam/erl_db_hash.h index 908cec11d4..e68081a5b1 100644 --- a/erts/emulator/beam/erl_db_hash.h +++ b/erts/emulator/beam/erl_db_hash.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1998-2013. All Rights Reserved. + * Copyright Ericsson AB 1998-2014. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -42,7 +42,7 @@ typedef struct hash_db_term { typedef struct db_table_hash_fine_locks { union { erts_smp_rwmtx_t lck; - byte _cache_line_alignment[64]; + byte _cache_line_alignment[ERTS_ALC_CACHE_LINE_ALIGN_SIZE(sizeof(erts_smp_rwmtx_t))]; }lck_vec[DB_HASH_LOCK_CNT]; } DbTableHashFineLocks; |