From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: hotplugd - event serializer and multiplexer
Date: Mon, 08 Mar 2004 17:25:21 +0000 [thread overview]
Message-ID: <1078766721.2540.12.camel@pim> (raw)
In-Reply-To: <20040307213757.GA24298@vrfy.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/<subsys>/ scripts and
default/ only if no <subsys>/ 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_id\x1470&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
next prev parent reply other threads:[~2004-03-08 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-07 21:37 hotplugd - event serializer and multiplexer Kay Sievers
2004-03-08 17:06 ` Patrick Mansfield
2004-03-08 17:25 ` Kay Sievers [this message]
2004-03-08 20:51 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1078766721.2540.12.camel@pim \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).