]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove the explicit call_rcu thread creating and destruction
authorOndřej Surý <ondrej@isc.org>
Mon, 26 Jun 2023 13:58:48 +0000 (15:58 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 27 Jun 2023 05:59:00 +0000 (07:59 +0200)
The free_all_cpu_call_rcu_data() call can consume hundreds of
milliseconds on shutdown.  Don't try to be smart and let the RCU library
handle this internally.

lib/isc/loop.c

index f9ebc49fe23b67c613005904a49e3baa8e000564..67f74c4571d38f8693525832a53363edac74646f 100644 (file)
@@ -434,8 +434,6 @@ isc_loopmgr_run(isc_loopmgr_t *loopmgr) {
         */
        ignore_signal(SIGPIPE, SIG_IGN);
 
-       bool free_call_rcu_data = !create_all_cpu_call_rcu_data(0);
-
        /*
         * The thread 0 is this one.
         */
@@ -450,12 +448,6 @@ isc_loopmgr_run(isc_loopmgr_t *loopmgr) {
        }
 
        isc_thread_main(loop_thread, &loopmgr->loops[0]);
-
-       rcu_barrier();
-
-       if (free_call_rcu_data) {
-               free_all_cpu_call_rcu_data();
-       }
 }
 
 void