From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 03 Aug 2006 14:09:11 +0000 Subject: Re: udev taking a long time during startup Message-Id: <1154614151.28034.2.camel@pim.off.vrfy.org> List-Id: References: <1154581441.8839.33.camel@piet2.bluelane.com> In-Reply-To: <1154581441.8839.33.camel@piet2.bluelane.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Wed, 2006-08-02 at 22:04 -0700, Piet Delaney wrote: > On Wed, 2006-08-02 at 10:57 +0200, Kay Sievers wrote: > > On Tue, 2006-08-01 at 00:16 -0700, Piet Delaney wrote: > > > We were wondering why there is a 60 second delay on our systems > > > from the time that the kernel releases memory and the file system=20 > > > is checked. > > >=20 > > > I dropped into kgdb during this period and found that an init > > > script, S10udev in our case, was sleeping in sys_nanosleep() > > > or sys_wait4(). Looks like thread/process S10udev forks udevstart > > > which forks udev which appears to be sleeping or waiting every time > > > I check in on it; Seems terribly wasteful. > > >=20 > > > udev seems to be a utility for hotplug and configured > > > with /etc/udev/udev.conf. Since we have no hot plug devices > > > I wonder if it really has to be called on every startup. On > > > solaris the device nodes are only re-established if you boot > > > with a -r option. > > >=20 > > > I never see any children of udev, so I wonder why it's > > > calling wait4() and nanosleep() so often. > >=20 > > You may check with your distro, that sounds like a broken setup. And > > please ask further questions on: linux-hotplug-devel@lists.sourceforge.= net >=20 > Yep, look like LFS linux-hotplug Developers Lists might be a good idea. >=20 > Looks like we must be using a LFS version prior to 6.1.1, as > we are using udev 030. I tried the latest 096 and installed it > in /usr/local. Was getting a bit tied on upgrading the config > and rule files to the new "=3D" convention for KERNEL and just installed > 030 in /usr/local so I could use the existing config and rules for now. >=20 > Booted fine with new udev utils from src with debug going > to /var/log/messages. As expected I saw a lot of nanosleeps, > a few for what appeared to be more than 10 iterations of 10 msec. >=20 > Since succeeding cases seemed to pass within 2 or 3 iterations of=20 > 10 msec I tried decreasing the loops (for us) to 5 iterations of 5=20 > msec. So far I don't see a problem or a substantial improvement;=20 > at least not with the tracing enabled. >=20 > We are using the 2.6.12 thru 2.6.15 kernels and are based on the stable > linux from scratch (LFS) pre 6.1.1 distro; I think it's 6.1; we > shouldn't be running on such an old distro (support gets hard). >=20 > http://www.linuxfromscratch.org/ >=20 > in the future I guess we will migrate to the development LFS distro > which is currently useing udev-096 and linux 2.6.16.27. > =20 >=20 > Tonight I tried udev 096 to /usr/local/ and installed the=20 > LFS udev-config-6.2.tar rules. >=20 > Syslog is showing some confusion with an exising daemon running: > ---------------------------------------------------------------- > Aug 2 20:38:53 localhost udevsend[1794]: starting udevd daemon > Aug 2 20:38:53 localhost udevd[1796]: udev_config_init: > UDEV_CONFIG_FILE=3D'/usr/local/etc/udev/udev.conf' > Aug 2 20:38:53 localhost udevd[1796]: udev_config_init: > udev_root=3D'/dev' > Aug 2 20:38:53 localhost udevd[1796]: udev_config_init: > udev_rules=3D'/usr/local/etc/udev/rules.d' > Aug 2 20:38:53 localhost udevd[1796]: udev_config_init: udev_log=3D7 > Aug 2 20:38:53 localhost udevd[1796]: main: version 096 > Aug 2 20:38:53 localhost udevd[1796]: init_udevd_socket: bind failed: > Address already in use Ugh, disable /proc/sys/kernel/hotplug and get rid of udevsend? All that old stuff can't, and never worked reliably and should be disabled. Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel