From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: cold plugging
Date: Sat, 14 Jan 2006 16:28:04 +0000 [thread overview]
Message-ID: <43C92694.6020705@gmail.com> (raw)
In-Reply-To: <200601131415.30207.treeve@scarlet.be>
(reposting from a different address, since SpamCop blacklisted the SMTP
server and the message sent from patrakov@ums.usu.ru didn't reach the
list. Sorry if you get this twice.)
Kay Sievers wrote:
>On Sat, Jan 14, 2006 at 06:10:48PM +0500, Alexander E. Patrakov wrote:
>
>
>>Kay Sievers wrote:
>>
>>
>>>On Sat, Jan 14, 2006 at 10:00:29AM +0500, Alexander E. Patrakov wrote:
>>>
>>>
>>>>Greg KH wrote:
>>>>
>>>>
>>>>
>>>>>Why does USB take longer for you? What is taking such a long time?
>>>>>
>>>>>
>>>>>
>>>>The /dev/bus/usb/... node for my Mustek Plug-N-Scan 1200 UB Plus scanner.
>>>>
>>>>
>>>It's the simplest way to wait for all events. Depending how you handle
>>>dependencies/checkoints on bootup, it may be sudfficient if all localfs
>>>devices have appeared and you can let the other events finish
>>>asynchronously.
>>>
>>>
>>>
>>>
>>Thanks, but you probably missed the point. Your loop does NOT wait for
>>all events. I think that in my case the following happens:
>>
>>1) The script creates an empty /dev/.udev/queue directory
>>2) The script causes the kernel to emit uevents
>>3) udevd gets those uevents, and reacts upon them. This reaction
>>involves, among other things, making device nodes and calling
>>/sbin/modprobe to load new drivers.
>>4) Those drivers are bound to devices by the kernel, this produces new
>>uevents, go to (3).
>>5) When the internal queue of udevd becomes empty, it removes the
>>/dev/.udev/queue directory and the loop exits.
>>
>>The problem is that some modules take longer than 0.1s to detect their
>>hardware, so there is a period of time longer than 0.1s with the empty
>>udevd queue, after which new uevents arrive.
>>
>>
>
>Which modprobe for which module is it, that returns before events for
>the devices are generated?
>
>
>
Sorry, after playing with udev versions and changing rules, I lost my
ability to reproduce this with my scanner alone. But this does happen
when I boot with both my scanner and my MP3 player plugged in. Leaked
events (i.e.: those that happen within 2 seconds after the end of the
loop) are pasted at the end of this mail, so I assume that it is related
with usb_storage for this report. Note that if I boot with only one of
those devices, nothing leaks.
UDEV_LOG=0
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2
SUBSYSTEM=usb
SEQNUM\x1518
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
- -------------------------------------
UDEV_LOG=0
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0
SUBSYSTEM=usb
SEQNUM\x1519
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/001/003
PRODUCTA9/a002/100
TYPE=0/0/0
INTERFACE=8/6/80
MODALIAS=usb:v0419pA002d0100dc00dsc00dp00ic08isc06ip50
UDEVD_EVENT=1
- -------------------------------------
UDEV_LOG=0
ACTIONd
DEVPATH=/class/usb_device/usbdev1.3
SUBSYSTEM=usb_device
SEQNUM\x1520
PHYSDEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
MAJOR\x189
MINOR=2
UDEVD_EVENT=1
DEVNAME=/dev/bus/usb/001/003
- -------------------------------------
UDEV_LOG=0
ACTIONd
DEVPATH=/class/scsi_host/host0
SUBSYSTEM=scsi_host
SEQNUM\x1526
PHYSDEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0/host0
UDEVD_EVENT=1
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&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:[~2006-01-14 16:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 12:17 cold plugging Treeve Jelbert
2006-01-13 12:32 ` Kay Sievers
2006-01-13 16:23 ` Alexander E. Patrakov
2006-01-13 18:47 ` Darren Salt
2006-01-13 18:52 ` Greg KH
2006-01-13 19:13 ` Scott James Remnant
2006-01-13 19:15 ` Marco d'Itri
2006-01-13 20:08 ` Darren Salt
2006-01-13 23:29 ` Pozsar Balazs
2006-01-13 23:53 ` Greg KH
2006-01-14 5:00 ` Alexander E. Patrakov
2006-01-14 5:57 ` Alexander E. Patrakov
2006-01-14 8:45 ` Pozsar Balazs
2006-01-14 12:48 ` Kay Sievers
2006-01-14 13:08 ` Kay Sievers
2006-01-14 13:10 ` Alexander E. Patrakov
2006-01-14 13:27 ` Kay Sievers
2006-01-14 16:28 ` Alexander E. Patrakov [this message]
2006-01-15 4:13 ` Dmitry Torokhov
2006-01-15 22:44 ` Aras Vaichas
2006-01-16 12:36 ` Kay Sievers
2006-01-16 12:53 ` Kay Sievers
2006-01-16 12:59 ` Olivier Blin
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=43C92694.6020705@gmail.com \
--to=patrakov@gmail.com \
--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).