Commit Graph

9 Commits

Author SHA1 Message Date
Denys Vlasenko
5bce135e36 mdev: improve $SEQ handling; improve debug logging
Sequential run of concurrent mdev's was too simplistic:
they waited for /dev/mdev.seq to match. This could sometimes
cause cumulative loss of time on the order of a second.

Added SIGCHLD signaling from exiting mdev to all other mdev's.
Added debugging required to see that code actually works as intended.

Example of /dev/mdev.log (with "woken up" elevated from dbg lvl 3 to 2):

mdev[1023]: first seq written
     ^^^^ seq, not pid
mdev[1023]: 35.022395 ACTION:add SUBSYSTEM:module DEVNAME:(null) DEVPATH:/module/lib80211
mdev[1023]: rule matched, line -1
                          ^^^^^^^ means "default rule"
mdev[1023]: 35.022676 exiting
            ^^^^^^^^^ second,usec timestamp
mdev[1024]: 35.069691 ACTION:add SUBSYSTEM:vc DEVNAME:vcs9 DEVPATH:/devices/virtual/vc/vcs9
mdev[1024]: dev 7,9
mdev[1025]: 35.069889 waiting for '1024'
mdev[1026]: 35.069946 waiting for '1024'
mdev[1027]: 35.070151 waiting for '1024'
mdev[1024]: rule matched, line -1
mdev[1024]: mknod vcs9 (7,9) 20660 0:0
mdev[1024]: 35.070346 exiting
mdev[1025]: woken up
mdev[1026]: woken up
mdev[1025]: 35.071213 ACTION:add SUBSYSTEM:vc DEVNAME:vcsa9 DEVPATH:/devices/virtual/vc/vcsa9
            ^^^^^^^^^ took only a millisecond to start running after prev mdev exited
mdev[1025]: dev 7,137
mdev[1027]: woken up
mdev[1025]: rule matched, line -1
mdev[1025]: mknod vcsa9 (7,137) 20660 0:0
mdev[1025]: 35.072109 exiting

function                                             old     new   delta
mdev_main                                            849    1372    +523
curtime                                                -      59     +59
dirAction                                             87     134     +47
static.ts                                              -       8      +8
keywords                                              19      12      -7
make_device                                         2189    2119     -70

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-27 10:51:41 +01:00
Denys Vlasenko
b6beada5a1 mdev: remove undocumented subsystem/devname matching hack
It was colliding with matching of devnames with slashes.
We need a more generic way to examine env.vars in rules anyway.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 15:11:16 +02:00
Denys Vlasenko
ea57f51819 mdev: when found, print major,minor into mdev.log
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 11:39:57 +02:00
Denys Vlasenko
516530c932 mdev: add support for $DEVNAME and /dev/mdev.log debug aid
function                                             old     new   delta
make_device                                         1843    2083    +240
mdev_main                                            712     804     +92
packed_usage                                       29236   29251     +15
keywords                                             288      19    -269
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 347/-269)           Total: 78 bytes
   text    data     bss     dec     hex filename
 887506     497    7584  895587   daa63 busybox_old
 887982     497    7584  896063   dac3f busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 04:45:35 +02:00
Denys Vlasenko
4a6a56c778 examples/mdev_fat.conf: small addition
I needed this to make Android's adb see my phone

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-16 03:03:54 +02:00
Denys Vlasenko
c096a6c208 mdev_fat.conf: add a rule to run nameif
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-11 06:32:43 +01:00
Denys Vlasenko
44f8d01399 tweak mdev_fat.conf example
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07 18:21:03 +01:00
Denys Vlasenko
bf40f564ae tweak examples
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07 17:54:44 +01:00
Denys Vlasenko
6e8e666bd9 adding examples/mdev_fat.conf
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07 04:00:03 +01:00