Systemd/udev/Makefile.am
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

91 lines
1.3 KiB
Makefile

include $(top_srcdir)/Makefile.am.inc
SUBDIRS = \
lib
sbin_PROGRAMS = \
udevd \
udevadm
noinst_PROGRAMS = \
test-udev
common_ldadd =
common_files = \
udev.h \
udev-sysdeps.h \
udev-event.c \
udev-watch.c \
udev-node.c \
udev-rules.c \
udev-util.c \
lib/libudev.h \
lib/libudev-private.h \
lib/libudev.c \
lib/libudev-list.c \
lib/libudev-util.c \
lib/libudev-device.c \
lib/libudev-device-db-write.c \
lib/libudev-monitor.c \
lib/libudev-enumerate.c \
lib/libudev-queue.c \
lib/libudev-queue-export.c \
lib/libudev-ctrl.c
if USE_SELINUX
common_files += \
udev-selinux.c
common_ldadd += \
$(SELINUX_LIBS)
endif
udevd_SOURCES = \
$(common_files) \
udevd.c
udevd_LDADD = \
$(common_ldadd)
udevadm_SOURCES = \
$(common_files) \
udevadm.c \
udevadm-info.c \
udevadm-control.c \
udevadm-test.c \
udevadm-monitor.c \
udevadm-settle.c \
udevadm-trigger.c
udevadm_LDADD = \
$(common_ldadd)
test_udev_SOURCES = \
$(common_files) \
test-udev.c
test_udev_LDADD = \
$(common_ldadd)
dist_man_MANS = \
udev.7 \
udevadm.8 \
udevd.8
EXTRA_DIST = \
udev.xml \
udevadm.xml \
udevd.xml
%.7 %.8 : %.xml
$(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
MAINTAINERCLEANFILES = \
$(dist_man_MANS)
git-clean:
rm -f Makefile.in