Make hazard pointers max_threads configurable at runtime.

hp implementation requires an object for each thread accessing
a hazard pointer. previous implementation had a hardcoded
HP_MAX_THREAD value of 128, which failed on machines with lots of
CPU cores (named uses 3n threads). We make isc__hp_max_threads
configurable at startup, with the value set to 4*named_g_cpus.
It's also important for this value not to be too big as we do
linear searches on a list.
This commit is contained in:
Witold Kręcicki
2019-12-12 23:41:57 +01:00
parent 1639dc8dca
commit 493b6a9f33
4 changed files with 38 additions and 10 deletions

View File

@@ -248,6 +248,7 @@ isc_hex_tobuffer
isc_hex_totext
isc_hp_clear
isc_hp_destroy
isc_hp_init
isc_hp_protect
isc_hp_protect_ptr
isc_hp_protect_release