mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
3131. [func] Improve scalability by allocating one zone task
per 100 zones at startup time, rather than using a fixed-size task table. [RT #24406]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: taskpool.h,v 1.15 2007/06/19 23:47:18 tbox Exp $ */
|
||||
/* $Id: taskpool.h,v 1.16 2011/07/06 01:36:32 each Exp $ */
|
||||
|
||||
#ifndef ISC_TASKPOOL_H
|
||||
#define ISC_TASKPOOL_H 1
|
||||
@@ -84,10 +84,49 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
|
||||
*/
|
||||
|
||||
void
|
||||
isc_taskpool_gettask(isc_taskpool_t *pool, unsigned int hash,
|
||||
isc_task_t **targetp);
|
||||
isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp);
|
||||
/*%<
|
||||
* Attach to the task corresponding to the hash value "hash".
|
||||
* Attach to a task from the pool. Currently the next task is chosen
|
||||
* from the pool at random. (This may be changed in the future to
|
||||
* something that guaratees balance.)
|
||||
*/
|
||||
|
||||
int
|
||||
isc_taskpool_size(isc_taskpool_t *pool);
|
||||
/*%<
|
||||
* Returns the number of tasks in the task pool 'pool'.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size,
|
||||
isc_taskpool_t **targetp);
|
||||
|
||||
/*%<
|
||||
* If 'size' is larger than the number of tasks in the pool pointed to by
|
||||
* 'sourcep', then a new taskpool of size 'size' is allocated, the existing
|
||||
* tasks from are moved into it, additional tasks are created to bring the
|
||||
* total number up to 'size', and the resulting pool is attached to
|
||||
* 'targetp'.
|
||||
*
|
||||
* If 'size' is less than or equal to the tasks in pool 'source', then
|
||||
* 'sourcep' is attached to 'targetp' without any other action being taken.
|
||||
*
|
||||
* In either case, 'sourcep' is detached.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
* \li 'sourcep' is not NULL and '*source' is not NULL
|
||||
* \li 'targetp' is not NULL and '*source' is NULL
|
||||
*
|
||||
* Ensures:
|
||||
*
|
||||
* \li On success, '*targetp' points to a valid task pool.
|
||||
* \li On success, '*sourcep' points to NULL.
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user