busybox/util-linux
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
..
volume_id whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
acpid.c CONFIG_PID_FILE_PATH: new configuration option for pidfile paths 2012-12-19 15:53:33 -05:00
blkid.c blkid: if parameters are given, do not scan /dev 2012-03-03 15:09:07 +01:00
blockdev.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
Config.src volume_id: add squashfs detection 2013-01-14 02:21:41 +01:00
dmesg.c dmesg: handle multi-char log levels 2013-01-05 21:02:14 -05:00
fbset.c fbset: respect rgba configuration lines in fb.modes 2012-07-07 19:58:15 +02:00
fdformat.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
fdisk_aix.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
fdisk_gpt.c *: whitespace fixes 2010-10-28 18:57:19 +02:00
fdisk_osf.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
fdisk_sgi.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
fdisk_sun.c fdisk_sun: fix partition alignment 2013-02-11 00:22:59 +01:00
fdisk.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
findfs.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
flock.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
freeramdisk.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
fsck_minix.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
getopt.c getopt: improve help text; code shrink 2013-01-24 11:36:00 +01:00
hexdump.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
hwclock.c hwclock: fix wrong comparison of time value (when it will overlow int) 2012-04-17 19:25:13 +02:00
ipcrm.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
ipcs.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
Kbuild.src mdev: expand --help so that it's actually useful. 2011-09-19 12:18:11 +02:00
losetup.c losetup: implement -r option. Closes 4033. 2011-09-12 08:30:16 +02:00
lspci.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
lsusb.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
mdev.c mdev: improve $SEQ handling; improve debug logging 2013-02-27 10:51:41 +01:00
minix.h
mkfs_ext2_test.sh
mkfs_ext2.c mount: fix the wrongly stored fs creation time 2012-06-21 16:50:46 +02:00
mkfs_ext2.txt
mkfs_minix.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
mkfs_reiser.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
mkfs_vfat.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
mkswap.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
more.c *: better comments on termios manipulations. No code changes. 2012-01-15 23:00:13 +01:00
mount.c mount: whitespace fix. no code changes 2013-01-22 11:00:45 +01:00
pivot_root.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
rdate.c rdate: code shrink 2012-06-11 14:57:29 +02:00
rdev.c *: style fixes. no code changes 2011-12-15 12:39:25 +01:00
readprofile.c whitespace fixes. no code changes 2013-01-14 01:34:48 +01:00
rev.c mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo 2011-01-18 13:58:01 +01:00
rtcwake.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
script.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
scriptreplay.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
setarch.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
swaponoff.c remove duplicate include <sys/swap.h> 2011-10-22 06:39:00 +02:00
switch_root.c libbb: make xchroot do a chdir("/") after chroot 2012-03-08 00:28:24 +01:00
umount.c umount: make -d always active, add -D to suppress it 2012-04-17 13:07:28 +02:00