Auto-configure '-slabs' values (#1276)

- Auto-configure '-slabs' values to a power of 2 value close to num-threads
  by default for multi-threaded environments.

Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
This commit is contained in:
Yorgos Thessalonikefs
2025-04-29 15:21:47 +02:00
committed by GitHub
co-authored by Wouter Wijngaards
parent a904a3a2c2
commit fcc21885e4
6 changed files with 111 additions and 29 deletions
+1
View File
@@ -670,6 +670,7 @@ authtest_addzone(struct auth_zones* az, const char* name, char* fname)
auth_zone_set_zonefile(z, fname);
z->for_upstream = 1;
cfg = config_create();
config_auto_slab_values(cfg);
free(cfg->chrootdir);
cfg->chrootdir = NULL;
+1
View File
@@ -131,6 +131,7 @@ void infra_test(void)
unit_show_feature("infra cache");
unit_assert(ipstrtoaddr("127.0.0.1", 53, &one, &onelen));
config_auto_slab_values(cfg);
slab = infra_create(cfg);
/* insert new record */
unit_assert( infra_host(slab, &one, onelen, zone, zonelen, now,
+1
View File
@@ -267,6 +267,7 @@ static void zonemd_verify_test(char* zname, char* zfile, char* tastr,
env.cfg = config_create();
if(!env.cfg)
fatal_exit("out of memory");
config_auto_slab_values(env.cfg);
env.now = &now;
env.cfg->val_date_override = cfg_convert_timeval(date_override);
if(!env.cfg->val_date_override)