Systemd/test
kay.sievers@vrfy.org 53921bfa44 [PATCH] udevd - cleanup and better timeout handling
On Thu, Jan 29, 2004 at 04:55:11PM +0100, Kay Sievers wrote:
> On Thu, Jan 29, 2004 at 02:56:25AM +0100, Kay Sievers wrote:
> > On Wed, Jan 28, 2004 at 10:47:36PM +0100, Kay Sievers wrote:
> > > Oh, couldn't resist to try threads.
> > > It's a multithreaded udevd that communicates through a localhost socket.
> > > The message includes a magic with the udev version, so we don't accept
> > > older udevsend's.
> > >
> > > No need for locking, cause we can't bind two sockets on the same address.
> > > The daemon tries to connect and if it fails it starts the daemon.
> > >
> > > We create a thread for every incoming connection, handle over the socket,
> > > sort the messages in the global message queue and exit the thread.
> > > Huh, that was easy with threads :)
> > >
> > > With the addition of a message we wakeup the queue manager thread and
> > > handle timeouts or move the message to the global exec list. This wakes
> > > up the exec list manager who looks if a process is already running for this
> > > device path.
> > > If yes, the exec is delayed otherwise we create a thread that execs udev.
> > > n the background. With the return of udev we free the message and wakeup
> > > the exec list manager to look if something is pending.
> > >
> > > It is just a quick shot, cause I couldn't solve the problems with fork an
> > > scheduling and I wanted to see if I'm to stupid  :)
> > > But if anybody with a better idea or more experience with I/O scheduling
> > > we may go another way. The remaining problem is that klibc doesn't support
> > > threads.
> > >
> > > By now, we don't exec anything, it's just a sleep 3 for every exec,
> > > but you can see the queue management by watching syslog and do:
> > >
> > >   DEVPATH=/abc ACTION=add SEQNUM=0 ./udevsend /abc
>
> Next version, switched to unix domain sockets.

Next cleaned up version. Hey, nobody wants to try it :)

Works for me, It's funny if I connect/disconnect my 4in1-usb-flash-reader
every two seconds. The 2.6 usb rocks! I can connect/diconnect a hub with 3
devices plugged in every second and don't run into any problem but a _very_
big udevd queue.
2005-04-26 21:13:20 -07:00
..
sys [PATCH] add more sysfs test tree files. 2005-04-26 21:06:23 -07:00
ignore_test [PATCH] convert the test shell scripts to the config file format. 2005-04-26 21:13:15 -07:00
label_test [PATCH] convert the test shell scripts to the config file format. 2005-04-26 21:13:15 -07:00
modifier_test [PATCH] convert the test shell scripts to the config file format. 2005-04-26 21:13:15 -07:00
replace_test [PATCH] convert the test shell scripts to the config file format. 2005-04-26 21:13:15 -07:00
test.all [PATCH] fix the test.block and test.tty scripts due to their moveing. Also add a test.all script. 2005-04-26 21:13:02 -07:00
test.block [PATCH] fix the test.block and test.tty scripts due to their moveing. Also add a test.all script. 2005-04-26 21:13:02 -07:00
test.tty [PATCH] fix the test.block and test.tty scripts due to their moveing. Also add a test.all script. 2005-04-26 21:13:02 -07:00
testd.block [PATCH] new testd.block script for debugging. 2005-04-26 21:13:18 -07:00
topo_test [PATCH] convert the test shell scripts to the config file format. 2005-04-26 21:13:15 -07:00
udev-test.pl [PATCH] add support for figuring out which device on the sysfs "chain" the rule applies to. 2005-04-26 21:13:17 -07:00
udev.permissions [PATCH] fix permission handling logic 2005-04-26 21:13:05 -07:00
udevd_test.sh [PATCH] udevd - cleanup and better timeout handling 2005-04-26 21:13:20 -07:00