]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] default -U to ncpus, not to -n
authorEvan Hunt <each@isc.org>
Wed, 23 Jan 2013 02:07:50 +0000 (18:07 -0800)
committerEvan Hunt <each@isc.org>
Wed, 23 Jan 2013 02:07:50 +0000 (18:07 -0800)
3471. [bug] The number of UDP dispatches now defaults to
the number of CPUs even if -n has been set to
a higher value. [RT #30964]
(cherry picked from commit 2154c019124246199c7fe494b86860461c8a5f40)

CHANGES
bin/named/main.c
bin/named/named.docbook

diff --git a/CHANGES b/CHANGES
index e9cc620dec729a734e9512d476ef1b92ee2c63c5..c48887a99a02d64df2e2726a34b5d73224766a05 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3471.  [bug]           The number of UDP dispatches now defaults to
+                       the number of CPUs even if -n has been set to
+                       a higher value. [RT #30964]
+
 3470.  [bug]           Slave zones could fail to dump when successfully
                        refreshing after an initial failure. [RT #31276]
 
index 74ca3a2e3113dd26c95a4b52e69ba25f60cb4ab5..dae567093694768b19247a53095e334dee90eb92 100644 (file)
@@ -597,7 +597,9 @@ create_managers(void) {
 #ifdef WIN32
        ns_g_udpdisp = 1;
 #else
-       if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus)
+       if (ns_g_udpdisp == 0)
+               ns_g_udpdisp = ns_g_cpus_detected;
+       if (ns_g_udpdisp > ns_g_cpus)
                ns_g_udpdisp = ns_g_cpus;
 #endif
        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
index 3de97e6ddfe6241e41a944f450189e8f79efea05..128ca572835734e836a03099b76ae8fb1d7ea5e8 100644 (file)
             Use <replaceable class="parameter">#listeners</replaceable>
             worker threads to listen for incoming UDP packets on each
             address.  If not specified, <command>named</command> will
-            use all of the worker threads for this purpose; the
-            <option>-U</option> option allows the number to be
-            decreased but not increased.
+            use the number of detected CPUs.  If <option>-n</option>
+            has been set to a higher value than the number of CPUs,
+            then <option>-U</option> may be increased as high as that
+            value, but no higher.
           </para>
         </listitem>
       </varlistentry>