Re: Help: undesired 10 seconds delay in creating USB devices - Kernel

This is a discussion on Re: Help: undesired 10 seconds delay in creating USB devices - Kernel ; On Thu, Oct 23, 2008 at 11:22:08AM -0300, Gu, Mingkun wrote: > Hi Gentlemen, > > I upgraded my kernel version from 2.6.13.5 to 2.6.21.7. I noted a 10 > seconds delay in creating the device node under /dev for ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: Help: undesired 10 seconds delay in creating USB devices

  1. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 11:22:08AM -0300, Gu, Mingkun wrote:
    > Hi Gentlemen,
    >
    > I upgraded my kernel version from 2.6.13.5 to 2.6.21.7. I noted a 10
    > seconds delay in creating the device node under /dev for a hotplug USB
    > device. The details are as follows:
    >
    > 1) if the device driver is not loaded, the device driver will be loaded
    > and a device name under /dev will be created immediately when I plug in
    > my USB device (a finger button board);
    >
    > 2) after the device driver has been loaded and unplugged the USB device
    > from the system, a 10 seconds delay in creating a device name under /dev
    > will be observed when I plug the device back into the system.


    What are you using to test that a 10 second delay is present?

    If you run 'udevadm monitor', does it show a 10 second delay?

    Remember, for a usb-storage device, the kernel will wait at least 5
    seconds before creating the block device for it as part of the "settle
    the device down" delay. If you don't like it, you can change that
    parameter to be shorter, but you do so at your own risk.

    thanks,

    greg k-h
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 01:11:00PM -0300, Gu, Mingkun wrote:

    Please stop sending email in HTML format, the mailing lists reject it.

    > [MKGU>] My device driver name is "usbled". Our USB device has
    > VendorID=11b4. After I unplugged the USB cable connecting to this device
    > and kept the device driver "usbled" remaining loaded, I plugged in the
    > USB cable back to the system again. I could see the device information
    > retrieved from /proc/bus/usb/devices immediately but the device name
    > /dev/usbled0 was seen after near 10 seconds.


    That sounds like a udev script issue, not a kernel issue, correct?

    > > If you run 'udevadm monitor', does it show a 10 second delay?

    >
    > [MKGU>] I don't have the program 'udevadm' on my system.


    Do you have the program 'udevmonitor'? I suggest trying that.

    thanks,

    greg k-h
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 18:13, Greg KH wrote:
    > On Thu, Oct 23, 2008 at 01:11:00PM -0300, Gu, Mingkun wrote:


    >> [MKGU>] My device driver name is "usbled". Our USB device has
    >> VendorID=11b4. After I unplugged the USB cable connecting to this device
    >> and kept the device driver "usbled" remaining loaded, I plugged in the
    >> USB cable back to the system again. I could see the device information
    >> retrieved from /proc/bus/usb/devices immediately but the device name
    >> /dev/usbled0 was seen after near 10 seconds.

    >
    > That sounds like a udev script issue, not a kernel issue, correct?
    >
    >> > If you run 'udevadm monitor', does it show a 10 second delay?

    >>
    >> [MKGU>] I don't have the program 'udevadm' on my system.

    >
    > Do you have the program 'udevmonitor'? I suggest trying that.


    2.6.21.7 (man, these silly numbers, no idea why people want to keep
    them ) should not be affected, as far as I know, but recent kernels
    might need a one-line fix to a (broken) udev rule, no to delay
    handling of some scsi devices, and wait at the wrong device for a
    sysfs file which will never appear. You can try commenting out a rule
    in /etc/udev/rules.d/*.rules, which has WAIT_FOR_SYSFS="ioerr_cnt" or
    similar.

    Kay
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 04:30:34PM -0300, Gu, Mingkun wrote:
    > > -----Original Message-----
    > > From: Greg KH [mailto:greg@kroah.com]
    > > Sent: Thursday, October 23, 2008 1:14 PM
    > > To: Gu, Mingkun
    > > Cc: linux-kernel@vger.kernel.org
    > > Subject: Re: Help: undesired 10 seconds delay in creating USB devices
    > >
    > > On Thu, Oct 23, 2008 at 01:11:00PM -0300, Gu, Mingkun wrote:
    > >
    > > Please stop sending email in HTML format, the mailing lists reject it.
    > >
    > > > [MKGU>] My device driver name is "usbled". Our USB device has
    > > > VendorID=11b4. After I unplugged the USB cable connecting to this

    > device
    > > > and kept the device driver "usbled" remaining loaded, I plugged in

    > the
    > > > USB cable back to the system again. I could see the device

    > information
    > > > retrieved from /proc/bus/usb/devices immediately but the device name
    > > > /dev/usbled0 was seen after near 10 seconds.

    > >
    > > That sounds like a udev script issue, not a kernel issue, correct?
    > >

    >
    > [MKGU>] Yes. It seems related to udev.
    >
    > > > > If you run 'udevadm monitor', does it show a 10 second delay?
    > > >
    > > > [MKGU>] I don't have the program 'udevadm' on my system.

    > >
    > > Do you have the program 'udevmonitor'? I suggest trying that.
    > >

    >
    > [MKGU>] Yes, I ran "udevmonitor" and captured the following messages:
    > UEVENT[1224775488.005799] remove /class/usb/usbled0 (usb)
    > UEVENT[1224775488.007901] remove /class/usb (class)
    > UEVENT[1224775488.011992] remove
    > /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    > UEVENT[1224775488.019706] remove
    > /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    > UEVENT[1224775496.176576] add
    > /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    > UEVENT[1224775496.181732] add
    > /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    > UEVENT[1224775496.186031] add /class/usb/usbled0 (usb)


    Then I suggest filing a bug with your distro to get this looked at, as
    they are responsible for the udev scripts here, nothing wrong with your
    kernel

    good luck,

    greg k-h
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 21:36, Greg KH wrote:
    > On Thu, Oct 23, 2008 at 04:30:34PM -0300, Gu, Mingkun wrote:
    >> > -----Original Message-----
    >> > From: Greg KH [mailto:greg@kroah.com]
    >> > Sent: Thursday, October 23, 2008 1:14 PM
    >> > To: Gu, Mingkun
    >> > Cc: linux-kernel@vger.kernel.org
    >> > Subject: Re: Help: undesired 10 seconds delay in creating USB devices
    >> >
    >> > On Thu, Oct 23, 2008 at 01:11:00PM -0300, Gu, Mingkun wrote:
    >> >
    >> > Please stop sending email in HTML format, the mailing lists reject it.
    >> >
    >> > > [MKGU>] My device driver name is "usbled". Our USB device has
    >> > > VendorID=11b4. After I unplugged the USB cable connecting to this

    >> device
    >> > > and kept the device driver "usbled" remaining loaded, I plugged in

    >> the
    >> > > USB cable back to the system again. I could see the device

    >> information
    >> > > retrieved from /proc/bus/usb/devices immediately but the device name
    >> > > /dev/usbled0 was seen after near 10 seconds.
    >> >
    >> > That sounds like a udev script issue, not a kernel issue, correct?
    >> >

    >>
    >> [MKGU>] Yes. It seems related to udev.
    >>
    >> > > > If you run 'udevadm monitor', does it show a 10 second delay?
    >> > >
    >> > > [MKGU>] I don't have the program 'udevadm' on my system.
    >> >
    >> > Do you have the program 'udevmonitor'? I suggest trying that.
    >> >

    >>
    >> [MKGU>] Yes, I ran "udevmonitor" and captured the following messages:
    >> UEVENT[1224775488.005799] remove /class/usb/usbled0 (usb)
    >> UEVENT[1224775488.007901] remove /class/usb (class)
    >> UEVENT[1224775488.011992] remove
    >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    >> UEVENT[1224775488.019706] remove
    >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    >> UEVENT[1224775496.176576] add
    >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    >> UEVENT[1224775496.181732] add
    >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    >> UEVENT[1224775496.186031] add /class/usb/usbled0 (usb)

    >
    > Then I suggest filing a bug with your distro to get this looked at, as
    > they are responsible for the udev scripts here, nothing wrong with your
    > kernel


    You don't have UDEV[...] events here? The interesting output of
    udevmonitor would the timing difference between the kernel events and
    the udev events, but you completely miss the udev ones.

    What version of udev, and which distro is that?

    Kay
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: Help: undesired 10 seconds delay in creating USB devices

    On Thu, Oct 23, 2008 at 22:04, Gu, Mingkun wrote:
    >> >> > On Thu, Oct 23, 2008 at 01:11:00PM -0300, Gu, Mingkun wrote:


    >> >> > > [MKGU>] My device driver name is "usbled". Our USB device has
    >> >> > > VendorID=11b4. After I unplugged the USB cable connecting to

    > this
    >> >> device
    >> >> > > and kept the device driver "usbled" remaining loaded, I plugged

    > in
    >> >> the
    >> >> > > USB cable back to the system again. I could see the device
    >> >> information
    >> >> > > retrieved from /proc/bus/usb/devices immediately but the device

    >> name
    >> >> > > /dev/usbled0 was seen after near 10 seconds.
    >> >> >
    >> >> > That sounds like a udev script issue, not a kernel issue,

    > correct?
    >> >> >
    >> >>
    >> >> [MKGU>] Yes. It seems related to udev.
    >> >>
    >> >> > > > If you run 'udevadm monitor', does it show a 10 second delay?
    >> >> > >
    >> >> > > [MKGU>] I don't have the program 'udevadm' on my system.
    >> >> >
    >> >> > Do you have the program 'udevmonitor'? I suggest trying that.
    >> >> >
    >> >>
    >> >> [MKGU>] Yes, I ran "udevmonitor" and captured the following

    > messages:
    >> >> UEVENT[1224775488.005799] remove /class/usb/usbled0 (usb)
    >> >> UEVENT[1224775488.007901] remove /class/usb (class)
    >> >> UEVENT[1224775488.011992] remove
    >> >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    >> >> UEVENT[1224775488.019706] remove
    >> >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    >> >> UEVENT[1224775496.176576] add
    >> >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
    >> >> UEVENT[1224775496.181732] add
    >> >> /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
    >> >> UEVENT[1224775496.186031] add /class/usb/usbled0 (usb)
    >> >
    >> > Then I suggest filing a bug with your distro to get this looked at,

    > as
    >> > they are responsible for the udev scripts here, nothing wrong with

    > your
    >> > kernel

    >>
    >> You don't have UDEV[...] events here? The interesting output of
    >> udevmonitor would the timing difference between the kernel events and
    >> the udev events, but you completely miss the udev ones.
    >>

    >
    > [MKGU>] Yes, I don't have UDEV[...] events captured. That's all what I
    > captured. I was using "udevmonitor" in the udev-113 package.


    >> What version of udev, and which distro is that?

    >
    > [MKGU>] I am not sure what version of my udev in use on the system. How
    > can I check its version? I am using kernel 2.6.21.7-cfs-v22.


    /sbin/udevd -V
    or
    udevinfo -V

    > [MKGU>] In reply to your question in another email, I did not find the
    > line containing the string WAIT_FOR_SYSFS= in all *.rules files under
    > /etc/udev/ and /etc/udev/rules.d/.


    Ok, sounds good. The default WAIT_FOR_SYSFS timeout is 10 seconds, so
    that would be the usual suspect.

    Kay
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread