systemd/udev Hardware Database
The udevd service has a long history of managing kernel devices. Besides generating events when devices are discovered or removed it maintains a dynamic, stateless database of all available devices including meta data about them. With Fedora 19 we want to substantially enhance the metadata that udev keeps for each device, by augmenting it from a userspace database of non-essential information, that is indexed by device identification data such as PCI/USB vendor/product IDs.
- Name: Kay Sievers
- Email: kay at redhat dot com
- Targeted release: Fedora 19
- Last updated: 2012-01-17
- Percentage of completion: 100%
The idea is to centralize a lot of static metadata that is currently kept in the PCI, USB, ACPI, Bluetooth, OUI vendor/product string lists in a indexed database and then attach it directly to the devices as they are probed. The lookup key is the "modalias" string exposed by devices, which is also used to find the right kernel modules for a device. The device meta data is kept in an indexed, binary database so that looking up this data is substantially faster than it used to be. In the longer run, this binary database shall also include other non-essential meta data about devices, for example information about the type of USB disks (i.e. is this USB mass storage device an SD reader?) and suchlike.
Benefit to Fedora
Applications can use this useful meta data simply by querying the udev properties.
Device probing gets a bit faster since we can look up a lot of data in an indexed database now, rather than having to match it individually with udev rules.
Only needs changes in systemd upstream.
How To Test
Play around with "udevadm hwdb". For more information, see the man page.
This is not visible to the user.
No need for additions.
Comments and Discussion