udev: increase receive buffer size

With the default 128KiB buffer size it is easy to lose events. For
example when 64 interfaces appear at the same time, we lose events for
the last 16. Increase the buffer size to 4MiB.

https://bugzilla.redhat.com/show_bug.cgi?id=1651578
(cherry picked from commit 5780a2893b)
This commit is contained in:
Beniamino Galvani 2018-12-03 17:51:43 +01:00
parent dc18a00a18
commit 19b7a4c167

View file

@ -253,6 +253,7 @@ nm_udev_client_new (const char *const*subsystems,
/* listen to events, and buffer them */
if (self->monitor) {
udev_monitor_set_receive_buffer_size (self->monitor, 4*1024*1024);
udev_monitor_enable_receiving (self->monitor);
channel = g_io_channel_unix_new (udev_monitor_get_fd (self->monitor));
self->watch_source = g_io_create_watch (channel, G_IO_IN);