summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-10-11 21:06:50 +0200
committerKay Sievers <kay.sievers@suse.de>2005-10-11 21:06:50 +0200
commita5c606f6c3c736bdd3a38b03aa8e1aa144bb3c98 (patch)
treee7e4e41d57c1ca5730ad633fc0d2920c90fe8cf6 /udevd.c
parent133326dc74d9f02686d480b2f4c8a1d9732ba1d6 (diff)
force event socket buffer size to 16MB
Netlink events get lost when the kernel creates thousends of events faster than udevd reads it. The default is 128 KB, which can carry app. 500 events. Set it to 16 MB now. I have 4000 fibrechannel LUNs connected to my system. There are two paths to the devices and two ports on the host connected via a switch. This gives 16000 when probed. I have had problems getting all of the entries in /dev created. -- Mark Haverkamp <markh@osdl.org> Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/udevd.c b/udevd.c
index 5974d14e8e..aaf80a2314 100644
--- a/udevd.c
+++ b/udevd.c
@@ -686,7 +686,7 @@ static void reap_sigchilds(void)
static int init_udevd_socket(void)
{
struct sockaddr_un saddr;
- const int buffersize = 1024 * 1024;
+ const int buffersize = 16 * 1024 * 1024;
socklen_t addrlen;
const int feature_on = 1;
int retval;
@@ -704,7 +704,7 @@ static int init_udevd_socket(void)
}
/* set receive buffersize */
- setsockopt(udevd_sock, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize));
+ setsockopt(udevd_sock, SOL_SOCKET, SO_RCVBUFFORCE, &buffersize, sizeof(buffersize));
/* the bind takes care of ensuring only one copy running */
retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen);
@@ -723,7 +723,7 @@ static int init_udevd_socket(void)
static int init_uevent_netlink_sock(void)
{
struct sockaddr_nl snl;
- const int buffersize = 1024 * 1024;
+ const int buffersize = 16 * 1024 * 1024;
int retval;
memset(&snl, 0x00, sizeof(struct sockaddr_nl));
@@ -738,7 +738,7 @@ static int init_uevent_netlink_sock(void)
}
/* set receive buffersize */
- setsockopt(uevent_netlink_sock, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize));
+ setsockopt(uevent_netlink_sock, SOL_SOCKET, SO_RCVBUFFORCE, &buffersize, sizeof(buffersize));
retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl,
sizeof(struct sockaddr_nl));