summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-10-31write trace log to stderrKay Sievers
2008-10-30fstab_import: add "change" event matchKay Sievers
2008-10-30edd_id: add "change" event matchKay Sievers
2008-10-30rules: remove "add" match from usb device node ruleKay Sievers
2008-10-30rules: remove SCSI timeoutsKay Sievers
On Thu, Oct 30, 2008 at 03:55, Tejun Heo <tj@kernel.org> wrote: The appropriate default timeout differs depending on the transport and the type of the attached device, so the above two rules harm more than help. The affect of the above two rules weren't visible for some reason but with recent block layer timeout update, they actually work and cause problems.
2008-10-29ATTR{}== always fails if the attribute does not existKay Sievers
2008-10-29udevd: merge exec and run queue to minimize devpath string comparesKay Sievers
2008-10-28udevd: simplify rules execution loopAlan Jenkins
cur can't become NULL, and the check for TK_END can be folded into the switch statement. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-28update NEWSKay Sievers
2008-10-26kerneldoc comment fixesAlan Jenkins
s/ressources/resources/ Also reduce commas per sentence and add a possessive apostrophe.
2008-10-26libudev: device - allocate envp array only onceKay Sievers
2008-10-26test: add RUN+="socket: ..." to a test to run monitor codeKay Sievers
2008-10-26libudev: device - fill envp array while composing monitor bufferKay Sievers
Thanks to Alan Jenkins, for the idea.
2008-10-26fix $attr{[<subsystem>/<sysname>]<attribute>} substitutionKay Sievers
2008-10-26do not init string arrays, just clear first byteKay Sievers
2008-10-26match_attr() - copy attr value only when neededKay Sievers
2008-10-26udevd: avoid implicit memset in match_attr()Alan Jenkins
Initializing a char array to "" is equivalent to a memset() call - which is exactly what it gets compiled to. Fixing this one callsite reduced memset() _user_ cpu cycles from 2-4% to 0.05% on the EeePC. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-25udevd: use a tighter loop for compare_devpath()Alan Jenkins
This crops up in my threaded udevd profiles from time to time. It's not consistent - probably due to variations in the number of concurrent events - but it can hit 4% user time and higher. The change halves the user time spent in compare_devpath(). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-25fix handling of string_escape optionAlan Jenkins
2008-10-25match KEY="A|B" without temporary string copyKay Sievers
2008-10-24remove debug printfKay Sievers
2008-10-24fix "unused" warningsKay Sievers
2008-10-24libudev: monitor - cache result of monitor send bufferKay Sievers
2008-10-24libudev: monitor - replace far too expensive snprintf() with strlcpy()Kay Sievers
2008-10-24special-case "?*" match to skip fnmatch()Kay Sievers
2008-10-24determine at rule parse time if we need to call fnmatch()Kay Sievers
This cuts down the large rule set's 120.000 calls to fnmatch() to 51.000, and we can just call strcmp for the simple matches.
2008-10-24distinguish "match" from "assign" by (op < OP_MATCH_MAX)Kay Sievers
2008-10-24cache uid/gid during rule parsingKay Sievers
This cuts down the number of parsing /etc/group from ~700 to 11, with some large rule files installed.
2008-10-24fix uninitialized variable warningsKay Sievers
2008-10-24rules: let empty strings added to buffer always return offset 0Kay Sievers
2008-10-23skip SYMLINK rules for devices without a device nodeKay Sievers
2008-10-23udevd: fix WAIT_FOR_SYSFS execution orderAlan Jenkins
The wait should be ordered after matching KERNEL, ENV, etc. but before ATTR. Without this, WAIT_FOR_SYSFS rules will be applied unconditionally to all events. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-23rule_generator: fix netif NAME= value extraction regexKay Sievers
$ sed -n -r \ -e 's/^#.*//' \ -e 's/[[:space:],]NAME="(eth[0-9]*)"[[:space:]]*(,.*|\\|)$/\1/p' \ /dev/null /etc/udev/rules.d/70-persistent-net.rules SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:41:e2:8d:c7", ATTR{type}=="1", KERNEL=="eth*",eth4 $ sed -n -r \ -e 's/^#.*//' \ -e 's/.*[[:space:],]NAME="(eth[0-9]*)".*/\1/p' \ /dev/null /etc/udev/rules.d/70-persistent-net.rules eth4
2008-10-23udevd: fix memory leakAlan Jenkins
Re: b99028c96307e729303be8f6750418979a7488b9 shrink struct udev_event TEST 136: test multi matches 2 device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0' expecting node 'right' ==15011== ==15011== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==15011== at 0x47F9AB8: malloc (vg_replace_malloc.c:207) ==15011== by 0x489CB5F: strdup (in /lib32/libc-2.7.so) ==15011== by 0x8050F40: udev_rules_apply_to_event (udev-rules.c:1973) ==15011== by 0x804A658: udev_event_execute_rules (udev-event.c:549) ==15011== by 0x805A636: main (test-udev.c:100) add: ok ==15012== ==15012== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==15012== at 0x47F1AB8: malloc (vg_replace_malloc.c:207) ==15012== by 0x4898B5F: strdup (in /lib32/libc-2.7.so) ==15012== by 0x8050F40: udev_rules_apply_to_event (udev-rules.c:1973) ==15012== by 0x804A9DF: udev_event_execute_rules (udev-event.c:658) ==15012== by 0x805A636: main (test-udev.c:100) remove: ok Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-23shrink struct udev_eventKay Sievers
2008-10-23shrink struct udev_eventKay Sievers
2008-10-23do not create temporary node ($tempnode) if node already existsKay Sievers
2008-10-23replace in-memory rules array with match/action token listKay Sievers
The in-memory rule array of a common desktop distro install took: 1151088 bytes with the token list: 109232 bytes tokens (6827 * 16 bytes), 71302 bytes buffer
2008-10-22handle numerical owner/group string in lookup_user/group()Kay Sievers
2008-10-22use re-entrant variants of getpwnam and getgrnamAlan Jenkins
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-22add util_resolve_subsys_kernel()Kay Sievers
2008-10-22volume_id: swap - larger PAGE_SIZE supportMatthias Koenig
2008-10-21replace strncpy() with strlcpy()Alan Jenkins
The problem was strncpy() doesn't stop after writing the terminating NUL; by definition it goes on to zero the entire buffer. I spy another use of strncpy in udev_device_add_property_from_string(), which is responsible for another ~1% user cpu time... Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-21libudev: device - 128 -> ENVP_SIZEKay Sievers
2008-10-21libudev: allocate udev_device->envp[] dynamicallyAlan Jenkins
Measured 2% _user_ cpu time reduction on EeePC coldplug. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-21libudev: util - optimize path_encode()Alan Jenkins
Since we already know the length, use memcpy() instead. Measured 2% _user_ cpu time reduction on EeePC coldplug. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-21use more appropriate alternatives to malloc()Alan Jenkins
Use calloc to request cleared memory instead. Kernel and libc conspire to make this more efficient. Also, replace one malloc() + strcpy() with strdup(). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-10-21do not use the new work-in-progress parser rule matcherKay Sievers
2008-10-21add "root" == 0 shortcuts to lookup_user/group()Kay Sievers
2008-10-21replace missing get_attr_value() -> get_sysattr_value()Kay Sievers