From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R32vp-0000Yx-2d for garchives@archives.gentoo.org; Mon, 12 Sep 2011 09:36:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C96321C112; Mon, 12 Sep 2011 09:35:50 +0000 (UTC) Received: from smtpq1.tb.mail.iss.as9143.net (smtpq1.tb.mail.iss.as9143.net [212.54.42.164]) by pigeon.gentoo.org (Postfix) with ESMTP id 8162C21C051 for ; Mon, 12 Sep 2011 09:34:21 +0000 (UTC) Received: from [212.54.42.146] (helo=smtp15.tb.mail.iss.as9143.net) by smtpq1.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1R32uC-0008FT-W9 for gentoo-user@lists.gentoo.org; Mon, 12 Sep 2011 11:34:20 +0200 Received: from 5ed027a1.cm-7-1a.dynamic.ziggo.nl ([94.208.39.161] helo=data.antarean.org) by smtp15.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1R32uC-0001q6-8F for gentoo-user@lists.gentoo.org; Mon, 12 Sep 2011 11:34:20 +0200 Received: from localhost (localhost [127.0.0.1]) by data.antarean.org (Postfix) with ESMTP id 08B6BCFB for ; Mon, 12 Sep 2011 11:34:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at antarean.org Received: from data.antarean.org ([127.0.0.1]) by localhost (data.antarean.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id njcuGW1JUAOX for ; Mon, 12 Sep 2011 11:34:21 +0200 (CEST) Received: from eve.localnet (eve.lan.antarean.org [10.20.13.50]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by data.antarean.org (Postfix) with ESMTPS id 53279B50 for ; Mon, 12 Sep 2011 11:34:21 +0200 (CEST) From: Joost Roeleveld To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] /dev/sda* missing at boot Date: Mon, 12 Sep 2011 11:34:17 +0200 Message-ID: <1399627.qpdD4FRV9H@eve> User-Agent: KMail/4.7.0 (Linux/2.6.36-gentoo-r5; KDE/4.7.0; x86_64; ; ) In-Reply-To: <20110912101345.7dbce89f@zaphod.digimed.co.uk> References: <201108191109.34984.michaelkintzios@gmail.com> <3531549.SdbnOTI6fV@eve> <20110912101345.7dbce89f@zaphod.digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1R32uC-0001q6-8F X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=-0.692, vereist 5, BAYES_00 -1.90, KHOP_DYNAMIC 0.73, RDNS_DYNAMIC 0.98, RP_MATCHES_RCVD -0.50) X-ZiggoSMTP-MailScanner-From: joost@antarean.org X-Spam-Status: No X-Archives-Salt: X-Archives-Hash: c960dcda2f623883b1ebfd5c93a3dde4 On Monday, September 12, 2011 10:13:45 AM Neil Bothwick wrote: > On Mon, 12 Sep 2011 11:07:12 +0200, Joost Roeleveld wrote: > > > I'd like to know why these functions cannot be separated, run the > > > command to populate /dev early on, then start the udev daemon after > > > the filesystems have been mounted. > > > > > > Some sort of early boot rules file would need to be used to handle > > > things like setting up symlinks for block devices to avoid breaking > > > some users' fstabs. > > > > Yes, which means "udev" would need to be split into: > > * devd (which controls the /dev-tree) > > * plugd (which handles all the "hotplug-events" where special things > > happen) > > > > The communication between the 2 could be done using a > > simple /dev/udev_pipe device. "devd" throws events onto the pipe and > > plugd handles these events. > > I wonder if it could be done more simply. udevd loads but only parses > those rule files marked as suitable for early boot time. Later in the > boot it switches to "full" mode and loads all rule files. > > This is so simple it is either pure genius or completely naive and > unworkable. I know which option my money is on... This would depend on wether or not udev (or whatever program handles the events) can pick specific events out of the queue. I think the events are placed on a queue waiting for some process to handle them and that process then does the following in an endless loop: 1) get event from queue 2) handle event In order to split the 2 options, there needs to be something that sorts them between "init-level" and "run-level" events where "init-level" is what is needed/possible during boot. As I currently understand it, the kernel does not support cherry-picking / multiple queues for hotplug-events and all devices cause a hotplug-event for the /dev-tree creation part of "udev". A second queue will need to be handled somehow. I also don't see why "udev" needs to get the additional code to handle delaying running external tools when this could be split off into seperate process. This way, if the program/script that is configured in the udev-rules causes a system-crash, avoiding the handler for these to start up, will actually provide a better fail-safe. The part that creates the dev-tree will still run and has become smaller and simpler. Would a udev-fork work for Gentoo? -- Joost