From: Ondřej Surý Date: Thu, 31 Mar 2022 20:15:49 +0000 (+0200) Subject: Set quantum to infinity for the zone loading task X-Git-Tag: v9.19.0~28^2~2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=87c4c24cdeb858decaf11232bd413a8a815b4732;p=thirdparty%2Fbind9.git Set quantum to infinity for the zone loading task When we are loading the zones, set the quantum to UINT_MAX, which makes task_run process all tasks at once. After the zone loading is finished the quantum will be dropped to 1 to not block server when we are loading new zones after reconfiguration. --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 31443d68157..ceb915ed5c8 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -2426,6 +2426,9 @@ zone_asyncload(isc_task_t *task, isc_event_t *event) { (asl->loaded)(asl->loaded_arg, zone, task); } + /* Reduce the quantum */ + isc_task_setquantum(zone->loadtask, 1); + isc_mem_put(zone->mctx, asl, sizeof(*asl)); dns_zone_idetach(&zone); } @@ -19167,7 +19170,7 @@ dns_zonemgr_setsize(dns_zonemgr_t *zmgr, int num_zones) { pool = NULL; if (zmgr->loadtasks == NULL) { result = isc_taskpool_create(zmgr->taskmgr, zmgr->mctx, ntasks, - 2, true, &pool); + UINT_MAX, true, &pool); } else { result = isc_taskpool_expand(&zmgr->loadtasks, ntasks, true, &pool);