bind9/lib/isc
Ondřej Surý 8c31a939c9
Implement incremental hash table resizing in isc_ht
Previously, an incremental hash table resizing was implemented for the
dns_rbt_t hash table implementation.  Using that as a base, also
implement the incremental hash table resizing also for isc_ht API
hashtables:

 1. During the resize, allocate the new hash table, but keep the old
    table unchanged.
 2. In each lookup, delete, or iterator operation, check both tables.
 3. Perform insertion operations only in the new table.
 4. At each insertion also move <r> elements from the old table to
    the new table.
 5. When all elements are removed from the old table, deallocate it.

To ensure that the old table is completely copied over before the new
table itself needs to be enlarged, it is necessary to increase the
size of the table by a factor of at least (<r> + 1)/<r> during resizing.

In our implementation <r> is equal to 1.

The downside of this approach is that the old table and the new table
could stay in memory for longer when there are no new insertions into
the hash table for prolonged periods of time as the incremental
rehashing happens only during the insertions.

(cherry picked from commit e42cb1f198)
2023-01-11 17:15:33 +01:00
..
include Implement incremental hash table resizing in isc_ht 2023-01-11 17:15:33 +01:00
netmgr Don't honour single read per client isc_nm_read() call in the TLSDNS 2023-01-11 10:17:55 +01:00
.gitignore [master] update gitignore files; use rev-parse to get srcid 2014-06-17 13:49:30 -07:00
aes.c Remove EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() shims 2022-03-02 10:49:47 +00:00
app.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
assertions.c Remove redundant #include <isc/strerr.h> 2022-10-17 16:08:28 +01:00
astack.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
backtrace.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
base32.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
base64.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
bind9.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
buffer.c change ISC__BUFFER macros to inline functions 2022-09-27 00:45:28 -07:00
commandline.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
condition.c Remove redundant #include <isc/strerr.h> 2022-10-17 16:08:28 +01:00
counter.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
crc64.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dir.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
entropy.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
entropy_private.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
errno.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
errno2result.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
errno2result.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
error.c Include the function name when reporting unexpected errors 2022-10-17 16:00:27 +01:00
event.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
file.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
fsaccess.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
fsaccess_common.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
fsaccess_common_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
glob.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
hash.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
heap.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
hex.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
hmac.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ht.c Implement incremental hash table resizing in isc_ht 2023-01-11 17:15:33 +01:00
httpd.c Be more resilient when destroying the httpd request 2022-11-29 10:11:28 +01:00
interfaceiter.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
iterated_hash.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
jemalloc_shim.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
lex.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
lib.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
log.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
Makefile.am Add picohttpparser.{c.h} from https://github.com/h2o/picohttpparser 2022-10-20 15:49:27 +02:00
managers.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
md.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mem.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
mem_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
meminfo.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mutex.c Remove redundant #include <isc/strerr.h> 2022-10-17 16:08:28 +01:00
mutexblock.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
net.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
netaddr.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
netmgr_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
netscope.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nonce.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
openssl_shim.c Do not provide a shim for SSL_SESSION_is_resumable() 2022-06-15 17:02:45 +03:00
openssl_shim.h Do not provide a shim for SSL_SESSION_is_resumable() 2022-06-15 17:02:45 +03:00
os.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
os_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
parseint.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
picohttpparser.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
picohttpparser.h Add picohttpparser.{c.h} from https://github.com/h2o/picohttpparser 2022-10-20 15:49:27 +02:00
pool.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
portset.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
quota.c REQUIRE should not have side effects 2022-07-05 13:04:17 -07:00
radix.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
random.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
ratelimiter.c Add FALLTHROUGH macro for __attribute__((fallthrough)) 2022-03-25 08:41:09 +01:00
regex.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
region.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
resource.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
result.c Add ISC_R_TLSBADPEERCERT error code to the TLS related code 2022-04-28 13:39:21 +03:00
rwlock.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
safe.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
serial.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
siphash.c Accept 'in=NULL' with 'inlen=0' in isc_{half}siphash24 2023-01-10 18:36:08 +11:00
sockaddr.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
stats.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stdio.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stdtime.c Deduplicate time unit conversion factors 2022-11-25 14:16:09 +00:00
string.c Use strnstr implementation from FreeBSD if not provided by OS 2022-10-04 15:33:33 +11:00
symtab.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
syslog.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
task.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
task_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
taskpool.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
thread.c Remove redundant #include <isc/strerr.h> 2022-10-17 16:08:28 +01:00
time.c Deduplicate time unit conversion factors 2022-11-25 14:16:09 +00:00
timer.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
timer_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tls.c Implement incremental hash table resizing in isc_ht 2023-01-11 17:15:33 +01:00
tls_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tm.c Add FALLTHROUGH macro for __attribute__((fallthrough)) 2022-03-25 08:41:09 +01:00
trampoline.c Lock the trampoline when attaching 2022-05-13 13:21:49 +02:00
trampoline_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
url.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
utf8.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00