summaryrefslogtreecommitdiff
path: root/udev.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-01-29 02:09:35 +0100
committerKay Sievers <kay.sievers@suse.de>2006-01-29 02:09:35 +0100
commit34f55103c5d451d247fc3b57579a6b3c1de0d58d (patch)
tree5b857a22e7f27864b254d7612508438e001f797b /udev.h
parent3d94fb8742847afe8396f6dd38b16ff4e836611d (diff)
optimize sysfs device and attribute cache
Add negative cache for attributes and look for device in cache before doing any sysfs access. (Three times speed up for a stupid 1000 rules SYSFS file). Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev.h')
-rw-r--r--udev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/udev.h b/udev.h
index 0c7ca12f10..2652d46ada 100644
--- a/udev.h
+++ b/udev.h
@@ -54,6 +54,7 @@ struct udev_rules;
struct sysfs_device {
struct list_head node; /* for device cache */
+ struct sysfs_device *parent; /* already cached parent*/
char devpath[PATH_SIZE];
char subsystem[NAME_SIZE]; /* $class/$bus/"drivers" */
char kernel_name[NAME_SIZE]; /* device instance name */