1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

45 Commits

Author SHA1 Message Date
Alan Jenkins
f503f6b22f udevd: implement a more efficient queue file format
Directory lookups show up in profiling. The queue files are responsible
for a large proportion of file-related system calls in udev coldplug.

Instead of creating a file for each event, append their details to a
log file.  The file is periodically rebuilt (garbage-collected) to
prevent it from growing indefinitely.

This single queue file replaces both the queue directory and the
uevent_seqnum file. On desktop systems the file tends not to grow
beyond one page. So it should also save a small amount of memory in
tmpfs.

Tests on a running EeePC indicate average savings of 5% *udevd* cpu time
as measured by oprofile. __link_path_walk is reduced from 1.5% to
1.3%. It is not completely clear where the rest of the gains come from.

In tests running ~400 events, the queue file is rebuilt about 5 times.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-21 22:22:37 +02:00
Kay Sievers
19d7e87cc0 libudev: monitor - export filter_update() 2009-04-23 18:05:10 +02:00
Kay Sievers
08a7a795f6 libudev: monitor - add udev_monitor_filter_remove 2009-04-23 04:07:51 +02:00
Kay Sievers
dacea9ff6b libudev: monitor - switch to filter_add_match_subsystem_devtype() 2009-04-23 03:24:38 +02:00
Kay Sievers
e14bdd88e9 libudev: monitor - add client socket filter for subsystem value
Messages send back by the udev daemon to the netlink socket are
multiplexed by the kernel and delivered to multiple clients. The
clients can upload a socket filter to let the kernel drop messages
not belonging to a certain subsystem. This prevent needless wakeups
and message processing for users who are only interested in a
subset of available events.

Recent kernels allow untrusted users to listen to the netlink
messages.

The messages send by the udev daemon are versioned, to prevent any
custom software reading them without libudev. The message wire format
may change with any udev version update.
2009-04-22 03:50:11 +02:00
Kay Sievers
56c141eceb libudev: test - add udev_device_get_property_value() 2009-01-06 16:52:40 +01:00
Kay Sievers
3d7b2831cd libudev: device - add udev_device_get_property_value() 2009-01-06 00:26:28 +01:00
Marcel Holtmann
61ee8cc92d libudev: device - remove udev_device_get_parent_with_subsystem 2009-01-03 15:12:28 +01:00
Marcel Holtmann
883012d49b libudev: device - lookup subsystem and devtype together 2009-01-03 15:12:17 +01:00
Marcel Holtmann
bf8b2ae177 libudev: device - add devtype support 2009-01-02 04:37:04 +01:00
Kay Sievers
f089350234 libudev: enumerate - add lookup by property 2008-12-29 07:42:19 +01:00
Kay Sievers
11d5eec2cb udevadm: settle - exit if udevd exits 2008-11-06 19:41:58 +01:00
Kay Sievers
69239210be libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
Kay Sievers
517814e7d0 libudev: handle ! in sysname, add sysnum, return allocated list_entry on add 2008-10-14 19:53:47 +02:00
Kay Sievers
90d80c2efc libudev: device - add device lookup by subsystem:sysname 2008-10-07 20:20:34 +02:00
Kay Sievers
3ab8ebf572 volume_id: add dbg() as noop to check for compile errors 2008-10-03 14:50:57 +02:00
Kay Sievers
98f10a9e2a libudev: device - add get_parent_with_subsystem() 2008-10-02 21:19:00 +02:00
Kay Sievers
13ddea8154 libudev: enumerate - add_device() -> add_syspath() 2008-10-02 11:54:33 +02:00
Kay Sievers
64ccdf8269 libudev: add queue interface 2008-10-01 09:34:07 +02:00
Kay Sievers
c97f839eed libudev: enumerate - scan devices and subsystems, add subsystem and attribute filter 2008-09-30 13:42:26 +02:00
Kay Sievers
438d4c3cd4 libudev: enumerate - split new() and scan() 2008-09-29 02:00:17 +02:00
Kay Sievers
bc8184ede9 libudev: enumerate - accept list of subsystems to scan, or skip 2008-09-28 17:39:31 +02:00
Kay Sievers
0de33a61d7 libudev: more list rework 2008-09-28 01:34:55 +02:00
Kay Sievers
e345e2670a libudev: rework list handling 2008-09-26 19:44:53 +02:00
Kay Sievers
cd42b50d86 libudev: enumerate_get_devices_list -> enumerate_get_list 2008-09-26 19:41:50 +02:00
Kay Sievers
bf7ad0ea66 libudev: replace awkward callback list interfaces with list iterators 2008-09-25 04:20:27 -07:00
Kay Sievers
c8e32461cc libudev: add userdata pointer 2008-09-24 21:39:29 -07:00
Kay Sievers
4c9dff47f6 libudev: add udev_device_new_from_devnum() 2008-09-21 23:28:56 -07:00
Kay Sievers
fb762bb928 libudev: udev_device_get_devname -> udev_device_get_devnode 2008-09-20 00:01:20 -07:00
Kay Sievers
a076080bd4 libudev: pass udev_device in enumerate 2008-09-17 23:32:43 -07:00
Kay Sievers
c68a293678 vol_id: fix lib logging glue 2008-09-16 00:40:47 -07:00
Kay Sievers
7b3a52f499 libudev: rename ctrl_msg to ctrl_msg_wire 2008-09-15 18:01:15 -07:00
Kay Sievers
8753fadf2a libudev: switch API from devpath to syspath 2008-09-15 17:12:47 -07:00
Kay Sievers
93b0f38458 libudev: udev_device - add attribute cache 2008-09-13 21:09:28 +02:00
Kay Sievers
b2d9e4f200 libudev: switch to "udev_device_get_parent" 2008-09-12 00:58:40 +02:00
Kay Sievers
4ad3a37f50 udevadm: info - use "udev_device" 2008-09-11 17:08:12 +02:00
Kay Sievers
6b12bdb624 libudev: rename enumerate function 2008-09-09 22:10:33 +02:00
Kay Sievers
1c7047ea77 libudev: monitor- add netlink uevent support 2008-09-09 17:38:10 +02:00
Kay Sievers
37372bbc38 libudev: monitor - add event properties to udev_device 2008-09-09 14:37:36 +02:00
Kay Sievers
c4f5f942d7 add a bunch of private device properties to udev_device 2008-09-09 14:06:20 +02:00
Kay Sievers
d59f11e140 move udev_ctrl to libudev-private 2008-09-08 17:59:00 +02:00
Kay Sievers
7d563a17f3 use libudev code, unify logging, pass udev context around everywhere 2008-09-06 15:45:31 +02:00
Kay Sievers
11d543c1ee libudev: add udev_device_get_syspath() 2008-09-01 18:52:22 +02:00
Kay Sievers
ba6929f669 libudev: add udev event monitor API 2008-08-28 23:05:01 +02:00
Kay Sievers
33a5cc2976 libudev: add library to access udev information 2008-08-27 17:11:58 +02:00