From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 22 Nov 2005 23:13:06 +0000 Subject: Re: waiting for an unknown set of udev /dev entries to complete Message-Id: <20051122231306.GA21094@vrfy.org> List-Id: References: <20051118223045.GA28401@us.ibm.com> In-Reply-To: <20051118223045.GA28401@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, Nov 21, 2005 at 01:01:54AM +0100, Marco d'Itri wrote: > On Nov 21, Kay Sievers wrote: > > > > I still see a problem with this design: there is a period (which may be > > > easy to hit if the udevd is spawning the maximum allowed number of > > > children), between when events are sent to udevd and when it starts > > > processing them, when the on-disk queue is empty. > > It's the received event queue, which is exported, not the processes > > currently running. What problem do you see related to the maximum number > > of childs? > Nevermind, this makes the race much shorter but it's still there. > > > There is still a small theorethical window between the module load > > and the first event for a device created by that module, but it's unlikely > > to hit that and it should be easy to work around that, if necessary. > Yes, this is what I meant (in the context of boot-time events synthesis) > and I do not like taking this risk. Scott sent a nice patch to remove the /dev/.udev.queue directory if it's empty. That makes it pretty easy to work around this: start udevd mkdir -p /dev/.udev/queue trigger uevent's in /sys while test -d /dev/.udev/queue; do sleep 0.1; done The last event will just rmdir() the created queue directory. Kay ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________ 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