From 6c1bb4bcfce103b3ef95e43fa5376b7d611ccc79 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 12 Apr 2017 17:34:46 +0200 Subject: erts: Increase number of check_io-fd-locks and use correct cache alignment. --- erts/emulator/sys/common/erl_check_io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c index 834b77eb58..f0854e8730 100644 --- a/erts/emulator/sys/common/erl_check_io.c +++ b/erts/emulator/sys/common/erl_check_io.c @@ -148,10 +148,11 @@ struct removed_fd { #ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS static int max_fds = -1; #endif -#define DRV_EV_STATE_LOCK_CNT 16 + +#define DRV_EV_STATE_LOCK_CNT 128 static union { erts_mtx_t lck; - byte _cache_line_alignment[64]; + byte _cache_line_alignment[ERTS_ALC_CACHE_LINE_ALIGN_SIZE(sizeof(erts_mtx_t))]; }drv_ev_state_locks[DRV_EV_STATE_LOCK_CNT]; static ERTS_INLINE erts_mtx_t* fd_mtx(ErtsSysFdType fd) -- cgit v1.2.3