Commit graph

32 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
Scott James Remnant bd284db142 udevd: optionally watch device nodes with inotify
This allows you to re-process the rules if the content of the device
has been changed, most useful for block subsystem to cause vol_id to
be run again.
2009-02-11 17:38:56 +00:00
Kay Sievers 5d89ef7bf9 make: do not delete autotools generated file with distclean
[...] running the command
`make maintainer-clean' should not delete `configure' even if
`configure' can be remade using a rule in the Makefile.  More
generally, `make maintainer-clean' should not delete anything that
needs to exist in order to run `configure' and then begin to build
the program.  This is the only exception; `maintainer-clean' should
delete everything else that can be rebuilt.
2008-12-06 04:03:08 +01:00
Kay Sievers a8a8930072 do not use the new work-in-progress parser rule matcher 2008-10-21 12:45:54 +02:00
Kay Sievers 69239210be libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
Kay Sievers c7521974a3 merge udev-rules.c and udev-rules-parse.c 2008-10-18 14:33:37 +02:00
Kay Sievers 7e02792760 udevd: use udev_list_node 2008-10-17 18:59:27 +02:00
Kay Sievers d130881d34 delete udev-util-file.c 2008-10-17 00:42:48 +02:00
Kay Sievers 8460299b57 rename udev source files 2008-10-16 18:13:48 +02:00
Kay Sievers fc233a874b move udev_device_db to libudev 2008-10-16 17:30:06 +02:00
Kay Sievers aa8734ffcb udevd: use libudev 2008-10-16 17:16:58 +02:00
Kay Sievers 7744e869ec move selinux noops to udev.h 2008-10-03 14:49:29 +02:00
Kay Sievers e598c5738c libudev: get rid of selinux
"Hello world!" linked against libselinux parses /proc/mounts and
whatever else on startup, even when the lib is not needed at all.
Not funny! Get rid of that thing where it's not absolutely needed.
2008-10-02 18:48:40 +02:00
Kay Sievers 8249e04e3e udevadm: settle - use libudev queue 2008-10-01 09:42:03 +02:00
Kay Sievers e345e2670a libudev: rework list handling 2008-09-26 19:44:53 +02:00
Kay Sievers bf7ad0ea66 libudev: replace awkward callback list interfaces with list iterators 2008-09-25 04:20:27 -07:00
Kay Sievers 38f27948cd always include config.h from Makefile 2008-09-19 23:03:49 -07:00
Kay Sievers 93b0f38458 libudev: udev_device - add attribute cache 2008-09-13 21:09:28 +02:00
Kay Sievers 31c1f53745 get rid of udev_sysdeps.c 2008-09-10 18:59:42 +02:00
Kay Sievers ecc9ec579f convert to libudev and delete udev_utils_string.c 2008-09-10 18:39:23 +02:00
Kay Sievers 3eb46ec6dd libudev: do not use any udev source file 2008-09-10 18:00:31 +02:00
Kay Sievers b2946df419 libudev: rename libudev-utils.c libudev-util.c 2008-09-10 17:12:33 +02:00
Kay Sievers 4f4b12c203 libudev: add selinux 2008-09-10 00:46:17 +02:00
Kay Sievers 8a4c287d15 udevadm: monitor - use libudev for udev monitor 2008-09-09 14:07:08 +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 8a3c06af21 udevadm: split out control functions 2008-09-03 23:48:44 +02:00
Kay Sievers e4255f1153 udevadm: rename source files 2008-09-03 23:33:06 +02:00
Kay Sievers d46f37fdee split udev_device.c to leave out rules handling from libudev 2008-08-29 20:32:05 +02:00
Kay Sievers 33a5cc2976 libudev: add library to access udev information 2008-08-27 17:11:58 +02:00
Karel Zak a3b55b1c47 build-sys: don't duplicate file names
Almost all filenames in udev/Makefile.am are duplicated in
{udevd,udevadm,test_udev}_SOURCE lists.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-13 11:12:53 +02:00
Kay Sievers 01618658fd use autotools 2008-07-30 01:45:23 +02:00