]> err.no Git - systemd/commit
udevd: avoid overhead of calling rmdir on non-empty directories
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Sat, 18 Oct 2008 12:39:04 +0000 (13:39 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 18 Oct 2008 13:28:49 +0000 (15:28 +0200)
commit836dcf951c0f6c4f76f7b194d5bb96d1cbb5366f
treefdad6d8324b7ccd2e8edb737c313f0c8645d2562
parentd0db192fa5a50eee27bce3e92c89f3ec1294638d
udevd: avoid overhead of calling rmdir on non-empty directories

Unfortunately the linux rmdir implementation unhashes the dentry
even when the directory is not removed.  This is apparently by
design (for filesystems that don't allow deleting open files).

Results from time(1) and oprofile follow.

Before:

0.35user 0.90system
samples  %        image name               symbol name
608       9.6738  vmlinux                  shrink_dcache_parent
293       4.6619  vmlinux                  copy_page_c
271       4.3119  vmlinux                  copy_page_range
257       4.0891  udevd                    udev_rules_iter_next

After:

0.31user 0.67system
samples  %        image name               symbol name
361       5.0419  vmlinux                  copy_page_range
322       4.4972  udevd                    udev_rules_iter_next
300       4.1899  vmlinux                  copy_page_c

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
udev/udevd.c