On 2013-11-10 14:30, Felix Fietkau wrote:
> On 2013-11-10 14:25, Bastian Bittorf wrote:
>> * Felix Fietkau <[email protected]> [10.11.2013 13:13]:
>>> For it to matter, I'm more interested in the absolute time saved than
>>> relative differences on a completely unrealistic number of iterations.
>>> In the case you're describing, it's still only saving about 7 ms per
>>> interface-up event, that's not a lot.
>>
>> i did some more debugging and it seems, that during bootup
>> '/sbin/hotplug' is called ~290 times:
>>
>> http://intercity-vpn.de/files/openwrt/hotplug-calls-debug-r38651.txt
>>
>> also during bootup there are calls for wifi down?:
>> HOTPLUG_TYPE=net ACTION=remove INTERFACE=wlan0
>> HOTPLUG_TYPE=net ACTION=remove INTERFACE=wlan1
>>
>> are all the calls to HOTPLUG_TYPE=tty intended?
>>
>> it doesnt seem very efficient...
> Now that's something worth optimizing. According to a simple grep, the
> part that uses the tty events is comgt (for 3g device hotplugging).
> We can probably fix this inefficiency by using a more specific rule in
> procd's hotplug json-script to replace the generic tty hotplug calls.
> We could then also make it check if the /etc/hotplug.d/$SUBSYSTEM
> directory exists before issuing a call to /sbin/hotplug-call.
You could try this patch to see if it makes a difference wrt. boot time:
---
--- a/package/system/procd/files/hotplug.json
+++ b/package/system/procd/files/hotplug.json
@@ -69,8 +69,14 @@
[ "exec", "/etc/rc.button/%BUTTON%" ]
],
[ "if",
- [ "eq", "SUBSYSTEM",
- [ "net", "input", "usb", "ieee1394", "block", "atm",
"zaptel", "tty", "button" ]
+ [ "or",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block",
"atm", "zaptel", "button" ],
+ ],
+ [ "and",
+ [ "eq", "SUBSYSTEM", "tty" ],
+ [ "regex", "DEVNAME", "^ttyUSB" ],
+ ]
],
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
],
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel