From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 08 Mar 2004 17:25:21 +0000 Subject: Re: hotplugd - event serializer and multiplexer Message-Id: <1078766721.2540.12.camel@pim> List-Id: References: <20040307213757.GA24298@vrfy.org> In-Reply-To: <20040307213757.GA24298@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, 2004-03-08 at 18:06, Patrick Mansfield wrote: > On Sun, Mar 07, 2004 at 10:37:57PM +0100, Kay Sievers wrote: > > The programs are executed in the background, but only _one_ program runs > > at any time for a single DEVPATH. No longer need for the various 'sleep 2' > > all over the scripts. It's possible now to order the programs, so that > > udev has already created all nodes, before the scripts are called. > > udevd is no longer neccessary, we can call udev directly. > > How does serializing these avoid kernel races in creating attributes after > the hotplug has been sent? Basically it's just udevd moved to /sbin/hotplug with the ability to run more programs than the single udev. If udev is the first program which is executed with a hotplug event, all other programs wait until udev is ready waiting for the attibutes and creating the nodes. So any program that run _after_ udev can be sure that everything is in place. Maybe we need some more folders in /etc/hotplug.d/. One with programs executed anytime before the /etc/hotplug.d// scripts and default/ only if no / is found? > > It doesn't depend on any shell and therefore should be very fast for > > a lot of devices connected at once. Hmm, I have only 4 :) > > Use scsi_debug. Build it as a module and load it via: > > /sbin/modprobe scsi_debug num_tgts=X max_luns=Y delay=T > > Where X * Y is the number of disks that will get created. The delay T > defaults to 1 milliseconds, changing this to 0 does not help as much as > you would think (probably because we have to wake up ksoftirqd to handle > the phony IO completions, rather than run them off of a timeout). > > The sysfs entries can use up quite a bit of memory. Nice, I will give it a try later tonight. thanks, Kay ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&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