receive udev messages directly from socket instead of the hal.hotplug helper

Kay Sievers kay.sievers at vrfy.org
Mon Aug 1 11:51:04 PDT 2005


On Mon, Aug 01, 2005 at 01:51:06PM -0400, David Zeuthen wrote:
> On Mon, 2005-08-01 at 08:08 +0200, Kay Sievers wrote:
> > The next udev version will able to send the udev events directly to a
> > socket without the need for a forked hal-helper:
> >   http://ehlo.org/~kay/?p=linux/hotplug/udev-kay.git;a=commit;h=d455b0085d65cd25915a34d84f894a4950d313a2
> > 
> > This udev rule:
> >   RUN="socket:/org/freedesktop/hal/udev_event"
> > 
> > instead of the current:
> >   RUN+="/usr/sbin/hal.hotplug"
> > 
> > will make udevstart (which is a single process, that completely serializes all events)
> > to take only 0.4 seconds instead of 0.8 seconds on my box.
> 
> Sweet. Looks OK to commit but before doing so I think we should work out
> what is missing. I think we want to install a rules file with the
> RUN="socket:/org/freedesktop/hal/udev_event" right?

Don't know. We need for both cases a rule. The old symlink in hotplug.d/
is no longer read by a default udev installation (but it can be emulated
with a small binary provided by udev).

> Btw, I think we need to be able to support older udev versions for a
> while (say, 3-4 months; we already require udev 057) so there should
> probably be a configuration switch so we do the right thing, e.g.
> install a rules file if using this new stuff and the hal.hotplug program
> otherwise.

I think we should leave it as for now and let the package builders
decide it, depending on their environment if they want to install
the symlink:
  /etc/hotplug.d/default/20-hal.hotplug symlink
the forked helper rule:
  RUN+="/usr/sbin/hal.hotplug"
or the socket communication:
  RUN+="socket:/org/freedesktop/hal/udev_event"

All three versions should work for now. Soon, I want to pass all the
device data, udev has already read from the hardware, to HAL:

  UDEV  [1122920185] add@/block/sda/sda1
  ACTION=add
  DEVPATH=/block/sda/sda1
  SUBSYSTEM=block
  SEQNUM=2159
  MINOR=1
  MAJOR=8
  PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/host13/target13:0:0/13:0:0:0
  PHYSDEVBUS=scsi
  PHYSDEVDRIVER=sd
  UDEVD_EVENT=1
  UDEV_LOG=3
  ID_VENDOR=IBM
  ID_MODEL=Memory_Key
  ID_REVISION=3.04
  ID_SERIAL=IBM_Memory_Key_0218B301030027E8
  ID_TYPE=disk
  ID_BUS=usb
  ID_PATH=usb-0218B301030027E8:0:0:0
  ID_FS_USAGE=filesystem
  ID_FS_TYPE=vfat
  ID_FS_VERSION=FAT16
  ID_FS_UUID=42D8-9E02
  ID_FS_LABEL_SAFE=s_p_c

Which will only work with the socket transport. And then we should remove
the old hotplug helper and and drive_id code from HAL.

3 months sounds good to me. :)

Cheers,
Kay
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list