select() timeouts on large installations

Cornelia Huck cohuck at de.ibm.com
Mon Aug 22 09:08:42 PDT 2005


Hi list,

I'm running into some problems when trying to start the HAL daemon on
large installations (like a S/390 LPAR with several thousands of
devices). Device detection may take quite some time, more than the 25
seconds specified as a timeout value for select() in hald/hald.c, and as
a result, the daemon will abort.

I've tried specifying a higher timeout, which works for me, but seems a
bit dumb (who guarantees us that there is no installation which needs
even more time?). strace doesn't show any place where the daemon spends
too much time waiting, it seems to be busy all the time gathering
information. Any idea on how device detection may be speeded up a bit?

Regards,
Cornelia

Index: hald/hald.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald.c,v
retrieving revision 1.38
diff -u -r1.38 hald.c
--- hald/hald.c	29 Jul 2005 20:32:57 -0000	1.38
+++ hald/hald.c	22 Aug 2005 14:16:49 -0000
@@ -358,8 +358,8 @@
 	FD_SET(child_fd, &rfds);
 	FD_ZERO(&efds);
 	FD_SET(child_fd, &efds);
-	/* Wait up to 25 seconds for device probing */
-	tv.tv_sec = 25;
+	/* Wait up to 250 seconds for device probing */
+	tv.tv_sec = 250;
 	tv.tv_usec = 0;
 
 	retval = select (child_fd + 1, &rfds, NULL, &efds, &tv);


More information about the hal mailing list