linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udev enhancements to use kernel event queue
@ 2003-06-12 19:10 Steven Dake
  2003-06-12 21:47 ` Patrick Mochel
                   ` (4 more replies)
  0 siblings, 5 replies; 73+ messages in thread
From: Steven Dake @ 2003-06-12 19:10 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]

Folks,

I have been looking at the udev idea that Greg KH has developed.  
Userland device enumeration definately is the way to go, however, there 
are some problems with using /sbin/hotplug to transmit device 
enumeration events:

1) performance of fork/exec with lots of devices is very poor
2) lots of processes can be forked with no policy to control how many 
are forked at once potentially leading to OOM
3) /sbin/hotplug events can occur out of order, eg: remove event occurs, 
/sbin/hotplug sleeps waiting for something, insert event occurs and 
completes immediately.  Then the remove event completes, after the 
insert, resulting in out-of-order completion and a broken /dev.  I have 
seen this several times with udev.
4) early device enumeration (character devices, etc) are missed because 
/sbin/hotplug is not available during early device init.

To solve these problems, I've developed a driver and some minor 
modifications to the lib/kobject.c to queue these events and allow a 
user space program to read the events at its leisure.  The driver 
supports poll/select for effecient use of the processor.

The feature is called the System Device Enumeration Event Queue.  I've 
attached a tarball which includes udev-0.1 modified to use the SDEQ, a 
kernel patch against linux 2.5.70 that implements the SDEQ, and a 
test/library that tests the SDEQ functionality.

To jump right in try these steps:
1)  apply the SDEQ patch
2) configure CONFIG_SDEQ on in config/general
3) make in the udev-0.1 directory
4) mkdir /newdevs (this is where the devices are enumerated)
5) reboot with new kernel
6) mount sysfs in /sys
7) mknod /dev/sdeq c 10 222 (this creates the device node that is used 
to communicate with the SDEQ)
7) run ./udev in udev-0.1 directory

Look in /newdevs for enumerated devices.

you can use fdisk on a disk device to see how dynamic device 
creation/deletion works.

If it works for you or doesn't or you like the idea or don't, I've love 
to hear about it

Thanks
-steve

[-- Attachment #2: sdeq.tar.gz --]
[-- Type: application/x-gzip, Size: 20163 bytes --]

^ permalink raw reply	[flat|nested] 73+ messages in thread
* Re: [PATCH] udev enhancements to use kernel event queue
@ 2003-06-14  6:36 John Bradford
  0 siblings, 0 replies; 73+ messages in thread
From: John Bradford @ 2003-06-14  6:36 UTC (permalink / raw)
  To: alan, joe.korty; +Cc: akpm, greg, linux-kernel, mochel, paulus, rml, sdake

> > > Turns out its 486 and higher, so you win.
> > Perhaps it's time to remove 386 support from 2.5?  Users
> > of very old machines can stick with 2.0, 2.2 or 2.4.

I strongly disagree, 386 support is important for the embedded
market.

> You have to solve these problems generally anyway, and lots of
> other platforms have limited locking functions.

Including future Linux platforms.

(possibly).

John.

^ permalink raw reply	[flat|nested] 73+ messages in thread

end of thread, other threads:[~2003-06-26 14:21 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-12 19:10 [PATCH] udev enhancements to use kernel event queue Steven Dake
2003-06-12 21:47 ` Patrick Mochel
2003-06-13 16:31   ` Steven Dake
2003-06-13 17:06     ` Patrick Mochel
2003-06-12 21:47 ` Greg KH
2003-06-12 22:03   ` Andrew Morton
2003-06-12 22:50     ` Greg KH
2003-06-12 22:51       ` Andrew Morton
2003-06-12 23:02         ` Greg KH
2003-06-12 23:09           ` Greg KH
2003-06-12 23:14             ` Patrick Mochel
2003-06-12 23:16             ` Robert Love
2003-06-12 23:25               ` Greg KH
2003-06-13 20:01                 ` Oliver Neukum
2003-06-18 22:59                   ` Greg KH
2003-06-19  0:12                     ` Kevin P. Fleming
2003-06-19  0:20                       ` Greg KH
2003-06-19  0:42                         ` Kevin P. Fleming
2003-06-19  0:51                           ` Greg KH
2003-06-19  0:25                       ` Andrew Morton
2003-06-19  6:27                       ` Oliver Neukum
2003-06-12 23:25               ` Patrick Mochel
2003-06-12 23:29                 ` Robert Love
2003-06-12 23:32                   ` Greg KH
2003-06-12 23:34                   ` Patrick Mochel
2003-06-12 23:40                     ` Paul Mackerras
2003-06-12 23:50                       ` Robert Love
2003-06-13 12:44                         ` Richard B. Johnson
2003-06-13 12:54                           ` Olivier Galibert
2003-06-12 23:52                       ` Patrick Mochel
2003-06-13  8:41                       ` Alan Cox
2003-06-13 11:00                         ` Paul Mackerras
2003-06-13 11:07                           ` Herbert Xu
2003-06-13 13:31                           ` Alan Cox
2003-06-13 19:57                             ` Joe Korty
2003-06-13 21:10                               ` Alan Cox
2003-06-13 11:17                       ` David Schwartz
2003-06-13 15:44                         ` Davide Libenzi
2003-06-12 23:42                     ` Robert Love
2003-06-12 23:45                     ` Davide Libenzi
2003-06-12 23:05       ` Robert Love
2003-06-19 19:51       ` Werner Almesberger
2003-06-26 12:17         ` Tommi Virtanen
2003-06-26 14:35           ` Werner Almesberger
2003-06-13  8:40     ` Alan Cox
2003-06-13  9:14       ` Olivier Galibert
2003-06-19 20:53         ` Werner Almesberger
2003-06-13 16:05       ` Steven Dake
2003-06-13 16:32       ` Greg KH
2003-06-13 15:51   ` Steven Dake
2003-06-13 16:41     ` Patrick Mochel
2003-06-13 16:42     ` Greg KH
2003-06-13 17:17       ` Chris Friesen
2003-06-12 22:27 ` Oliver Neukum
2003-06-13 16:03   ` Steven Dake
2003-06-13 16:50     ` Patrick Mochel
2003-06-13 17:10       ` Steven Dake
2003-06-13 18:26         ` Greg KH
2003-06-13 19:02         ` Patrick Mansfield
2003-06-13 17:32     ` Oliver Neukum
2003-06-13 18:23     ` Greg KH
2003-06-13 18:24     ` Greg KH
2003-06-13  7:17 ` Christoph Hellwig
2003-06-13 18:06 ` Linus Torvalds
2003-06-19 23:32   ` Werner Almesberger
2003-06-19 23:42     ` Steven Dake
2003-06-20  0:05       ` Linus Torvalds
2003-06-20  0:10         ` Steven Dake
2003-06-20  0:43           ` Linus Torvalds
2003-06-20  2:26             ` Werner Almesberger
2003-06-20 17:03             ` Steven Dake
2003-06-20 17:18               ` Patrick Mochel
2003-06-14  6:36 John Bradford

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).