From 33e5888cb723bb43bc622eaa8ded2c9f383e4a54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Thu, 19 Aug 2021 16:58:14 +0200
Subject: [PATCH] Revert "Reduce the nodelock count for both cache and regular
rbtdb"
This reverts commit bceda720e420cd22e60c7a407535746281efb33b.
https://gitlab.isc.org/isc-projects/bind9/-/issues/2872
---
lib/dns/rbtdb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
index 18503950ad..5c37b7d049 100644
--- a/lib/dns/rbtdb.c
+++ b/lib/dns/rbtdb.c
@@ -348,7 +348,7 @@ typedef ISC_LIST(dns_rbtnode_t) rbtnodelist_t;
(((header)->rdh_ttl > (now)) || \
((header)->rdh_ttl == (now) && ZEROTTL(header)))
-#define DEFAULT_NODE_LOCK_COUNT 7 /*%< Should be prime. */
+#define DEFAULT_NODE_LOCK_COUNT 53 /*%< Should be prime. */
#define RBTDB_GLUE_TABLE_INIT_BITS 2U
#define RBTDB_GLUE_TABLE_MAX_BITS 32U
#define RBTDB_GLUE_TABLE_OVERCOMMIT 3
@@ -380,7 +380,7 @@ hash_32(uint32_t val, unsigned int bits) {
#define DEFAULT_CACHE_NODE_LOCK_COUNT DNS_RBTDB_CACHE_NODE_LOCK_COUNT
#endif /* if DNS_RBTDB_CACHE_NODE_LOCK_COUNT <= 1 */
#else /* ifdef DNS_RBTDB_CACHE_NODE_LOCK_COUNT */
-#define DEFAULT_CACHE_NODE_LOCK_COUNT 17
+#define DEFAULT_CACHE_NODE_LOCK_COUNT 97
#endif /* DNS_RBTDB_CACHE_NODE_LOCK_COUNT */
typedef struct {
--
2.31.1