]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
PR28708: debuginfod: use MHD_USE_EPOLL for microhttpd threads
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 3 Apr 2022 16:47:17 +0000 (12:47 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sun, 3 Apr 2022 16:47:17 +0000 (12:47 -0400)
Testing on s390x and other architectures indicates that this
configuration reduces thundering-herd wakeups and saturation of a
small number of threads.  The run-debuginfod-webapi-concurrency.sh
test appears solid now.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx

index dfb5d42ec8a5afed4292ee46eb107343b2e68d32..38a389e7dfd39eb52aa5390bdd20d7469e96c1cf 100644 (file)
@@ -1,3 +1,8 @@
+2022-04-03  Frank Ch. Eigler <fche@redhat.com>
+
+       * debuginfod.cxx (main): Use MHD_USE_EPOLL for libmicrohttpd, to
+       encourage more round-robin dispatch of incoming connections.
+
 2021-12-09  Alexander Kanavin <alex@linutronix.de>
 
        * debuginfod-client.c (cache_clean_default_interval_s): Change type to
index bb8e8e10289657c1b4fae20f0cfb7dd5c2c5fa04..99924d36f26040bed5aec36e87116fcb4e42a134 100644 (file)
@@ -3880,6 +3880,9 @@ main (int argc, char *argv[])
                                      | MHD_USE_INTERNAL_POLLING_THREAD
 #else
                                      | MHD_USE_SELECT_INTERNALLY
+#endif
+#ifdef MHD_USE_EPOLL
+                                     | MHD_USE_EPOLL
 #endif
                                      | MHD_USE_DEBUG, /* report errors to stderr */
                                      http_port,
@@ -3894,6 +3897,9 @@ main (int argc, char *argv[])
                                      | MHD_USE_INTERNAL_POLLING_THREAD
 #else
                                      | MHD_USE_SELECT_INTERNALLY
+#endif
+#ifdef MHD_USE_EPOLL
+                                     | MHD_USE_EPOLL
 #endif
                                      | MHD_USE_IPv6
                                      | MHD_USE_DEBUG, /* report errors to stderr */