2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

[master] add zone memory context pools

3492.	[bug]		Fixed a regression in zone loading performance
			due to lock contention. [RT #30399]
This commit is contained in:
Evan Hunt
2013-02-20 21:39:05 -08:00
parent d642d38571
commit df925e6c66
30 changed files with 797 additions and 85 deletions

View File

@@ -3028,7 +3028,8 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
}
}
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zonemgr_createzone(ns_g_server->zonemgr,
&zone));
CHECK(dns_zone_setorigin(zone, name));
dns_zone_setview(zone, view);
CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr,
@@ -3582,7 +3583,8 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
dns_zone_attach(pview->redirect, &zone);
dns_zone_setview(zone, view);
} else {
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zonemgr_createzone(ns_g_server->zonemgr,
&zone));
CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setview(zone, view);
CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr,
@@ -3645,7 +3647,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
* We cannot reuse an existing zone, we have
* to create a new one.
*/
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zonemgr_createzone(ns_g_server->zonemgr, &zone));
CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setview(zone, view);
if (view->acache != NULL)
@@ -3763,7 +3765,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
}
/* No existing keydata zone was found; create one */
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zonemgr_createzone(ns_g_server->zonemgr, &zone));
CHECK(dns_zone_setorigin(zone, dns_rootname));
isc_sha256_data((void *)view->name, strlen(view->name), buffer);