diff options
-rw-r--r-- | erts/configure.in | 11 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db_hash.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in index 7ad0a6caf0..c964327ebc 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -426,6 +426,17 @@ AS_HELP_STRING([--enable-static-drivers], [comma seperated list of linked-in dri STATIC_DRIVERS=no) AC_SUBST(STATIC_DRIVERS) +AC_ARG_WITH(ets-write-concurrency-locks, + AS_HELP_STRING([--with-ets-write-concurrency-locks={8,16,32,64,128,256}], + [specify how many locks the write_concurrency option for ets should use.]) + AS_HELP_STRING([--without-ets-write-concurrency-locks], + [use the default number of write_concurrency locks (default)])) + +if test X"$with_ets_write_concurrency_locks" != X""; then + AC_DEFINE_UNQUOTED(ERTS_DB_HASH_LOCK_CNT,$with_ets_write_concurrency_locks, + [Define to override the default number of write_concurrency locks]) +fi + dnl ---------------------------------------------------------------------- dnl Checks for programs. dnl ---------------------------------------------------------------------- diff --git a/erts/emulator/beam/erl_db_hash.h b/erts/emulator/beam/erl_db_hash.h index d17bd9f693..908cec11d4 100644 --- a/erts/emulator/beam/erl_db_hash.h +++ b/erts/emulator/beam/erl_db_hash.h @@ -33,7 +33,12 @@ typedef struct hash_db_term { DbTerm dbterm; /* The actual term */ } HashDbTerm; +#ifdef ERTS_DB_HASH_LOCK_CNT +#define DB_HASH_LOCK_CNT ERTS_DB_HASH_LOCK_CNT +#else #define DB_HASH_LOCK_CNT 64 +#endif + typedef struct db_table_hash_fine_locks { union { erts_smp_rwmtx_t lck; |