bind9/bin
Ondřej Surý b540722bc3 Refactor taskmgr to run on top of netmgr
This commit changes the taskmgr to run the individual tasks on the
netmgr internal workers.  While an effort has been put into keeping the
taskmgr interface intact, couple of changes have been made:

 * The taskmgr has no concept of universal privileged mode - rather the
   tasks are either privileged or unprivileged (normal).  The privileged
   tasks are run as a first thing when the netmgr is unpaused.  There
   are now four different queues in in the netmgr:

   1. priority queue - netievent on the priority queue are run even when
      the taskmgr enter exclusive mode and netmgr is paused.  This is
      needed to properly start listening on the interfaces, free
      resources and resume.

   2. privileged task queue - only privileged tasks are queued here and
      this is the first queue that gets processed when network manager
      is unpaused using isc_nm_resume().  All netmgr workers need to
      clean the privileged task queue before they all proceed normal
      operation.  Both task queues are processed when the workers are
      finished.

   3. task queue - only (traditional) task are scheduled here and this
      queue along with privileged task queues are process when the
      netmgr workers are finishing.  This is needed to process the task
      shutdown events.

   4. normal queue - this is the queue with netmgr events, e.g. reading,
      sending, callbacks and pretty much everything is processed here.

 * The isc_taskmgr_create() now requires initialized netmgr (isc_nm_t)
   object.

 * The isc_nm_destroy() function now waits for indefinite time, but it
   will print out the active objects when in tracing mode
   (-DNETMGR_TRACE=1 and -DNETMGR_TRACE_VERBOSE=1), the netmgr has been
   made a little bit more asynchronous and it might take longer time to
   shutdown all the active networking connections.

 * Previously, the isc_nm_stoplistening() was a synchronous operation.
   This has been changed and the isc_nm_stoplistening() just schedules
   the child sockets to stop listening and exits.  This was needed to
   prevent a deadlock as the the (traditional) tasks are now executed on
   the netmgr threads.

 * The socket selection logic in isc__nm_udp_send() was flawed, but
   fortunatelly, it was broken, so we never hit the problem where we
   created uvreq_t on a socket from nmhandle_t, but then a different
   socket could be picked up and then we were trying to run the send
   callback on a socket that had different threadid than currently
   running.
2021-04-20 23:22:28 +02:00
..
check Install man page for named-compilezone 2021-03-22 09:36:48 +01:00
confgen Address a Sphinx duplicate label warning 2021-02-03 11:44:02 +01:00
delv Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
dig Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
dnssec Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
named Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
nsupdate Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
pkcs11 Add libssl libraries to Windows build 2020-11-09 16:00:28 +01:00
plugins Add filter-a plugin for IPv6-dominant environments 2021-03-19 08:06:55 +01:00
rndc Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
tests Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
tools Refactor taskmgr to run on top of netmgr 2021-04-20 23:22:28 +02:00
win32/BINDInstall Fixup win32 paths for moved bin/tests/system/resolve 2021-04-19 12:51:33 +02:00
Makefile.am Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00