[systemd-commits] 2 commits - src/core src/libsystemd

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Wed Mar 4 18:43:47 PST 2015


 src/core/dbus.c                    |    2 +-
 src/libsystemd/sd-event/sd-event.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit cbecf9bf929318533fea798c57c10efcf6b2b447
Author: Hannes Reinecke <hare at suse.de>
Date:   Wed Mar 4 16:32:17 2015 +0100

    Allow up to 4096 simultaneous connections
    
    On large system we hit the limit on 512 simultaneous dbus
    connections, resulting in tons of annoying messages:
    
    Too many concurrent connections, refusing
    
    This patch raises the limit to 4096.

diff --git a/src/core/dbus.c b/src/core/dbus.c
index 5dcb0d1..80f7589 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -43,7 +43,7 @@
 #include "bus-internal.h"
 #include "selinux-access.h"
 
-#define CONNECTIONS_MAX 512
+#define CONNECTIONS_MAX 4096
 
 static void destroy_bus(Manager *m, sd_bus **bus);
 

commit 1c724e9e0ec5bc4bf791a3d7b1cf5b955cdb98b2
Author: Hannes Reinecke <hare at suse.de>
Date:   Wed Mar 4 16:32:16 2015 +0100

    Remove the cap on epoll events
    
    Currently the code will silently blank out events if there are more
    then 512 epoll events, causing them never to be handled at all. This
    patch removes the cap on the number of events for epoll_wait, thereby
    avoiding this issue.

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 0c4e517..bcf5887 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -36,7 +36,6 @@
 
 #include "sd-event.h"
 
-#define EPOLL_QUEUE_MAX 512U
 #define DEFAULT_ACCURACY_USEC (250 * USEC_PER_MSEC)
 
 typedef enum EventSourceType {
@@ -2366,7 +2365,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) {
                 return 1;
         }
 
-        ev_queue_max = CLAMP(e->n_sources, 1U, EPOLL_QUEUE_MAX);
+        ev_queue_max = MAX(e->n_sources, 1u);
         ev_queue = newa(struct epoll_event, ev_queue_max);
 
         m = epoll_wait(e->epoll_fd, ev_queue, ev_queue_max,



More information about the systemd-commits mailing list