diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-15 22:33:13 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-15 22:33:13 +0000 |
commit | 018bee6afb0a7b9e09616a52f2f24f65fcf07322 (patch) | |
tree | 8c86e74a094c12686adac6bb4cec56ba52347bda /docs | |
parent | 97faf531c81be075ecafb2ac83b17eae78cd2afb (diff) | |
download | busybox-w32-018bee6afb0a7b9e09616a52f2f24f65fcf07322.tar.gz busybox-w32-018bee6afb0a7b9e09616a52f2f24f65fcf07322.tar.bz2 busybox-w32-018bee6afb0a7b9e09616a52f2f24f65fcf07322.zip |
mdev: support for serializing hotplug
function old new delta
mdev_main 503 647 +144
Diffstat (limited to 'docs')
-rw-r--r-- | docs/mdev.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/mdev.txt b/docs/mdev.txt index 1a97be4ce..555c2bf61 100644 --- a/docs/mdev.txt +++ b/docs/mdev.txt | |||
@@ -95,3 +95,26 @@ properly initialize a device. Place all such firmware files into the | |||
95 | filename of the firmware which mdev will load out of /lib/firmware/ and into | 95 | filename of the firmware which mdev will load out of /lib/firmware/ and into |
96 | the kernel via the sysfs interface. The exact filename is hardcoded in the | 96 | the kernel via the sysfs interface. The exact filename is hardcoded in the |
97 | kernel, so look there if you need to know how to name the file in userspace. | 97 | kernel, so look there if you need to know how to name the file in userspace. |
98 | |||
99 | ------------ | ||
100 | SEQUENCING | ||
101 | ------------ | ||
102 | |||
103 | Kernel does not serialize hotplug events. It increments SEQNUM environmental | ||
104 | variable for each successive hotplug invocation. Normally, mdev doesn't care. | ||
105 | This may reorder hotplug and hot-unplug events, with typical symptoms of | ||
106 | device nodes sometimes not created as expected. | ||
107 | |||
108 | However, if /dev/mdev.seq file is found, mdev will compare its | ||
109 | contents with SEQNUM. It will retry up to two seconds, waiting for them | ||
110 | to match. If they match exactly (not even trailing '\n' is allowed), | ||
111 | or if two seconds pass, mdev runs as usual, then it rewrites /dev/mdev.seq | ||
112 | with SEQNUM+1. | ||
113 | |||
114 | IOW: this will serialize concurrent mdev invocations. | ||
115 | |||
116 | If you want to activate this feature, execute "echo >/dev/mdev.seq" prior to | ||
117 | setting mdev to be the hotplug handler. This writes single '\n' to the file. | ||
118 | NB: mdev recognizes /dev/mdev.seq consisting of single '\n' characher | ||
119 | as a special case. IOW: this will not make your first hotplug event | ||
120 | to stall for two seconds. | ||