From 4984158b95c5a0c3922cd34940c393652d080f99 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Sun, 14 Jan 2018 17:54:42 +0000
Subject: New mdevd model, prepare for 0.1.0.0
- mdevd-netlink removed
- mdevd listens to the netlink itself
- mdevd-coldplug writes nothing to stdout, but triggers the kernel to create uevents
---
doc/index.html | 5 +-
doc/mdevd-coldplug.html | 25 ++++------
doc/mdevd-netlink.html | 124 ------------------------------------------------
doc/mdevd.html | 44 ++++++++---------
doc/upgrade.html | 11 +++++
5 files changed, 42 insertions(+), 167 deletions(-)
delete mode 100644 doc/mdevd-netlink.html
(limited to 'doc')
diff --git a/doc/index.html b/doc/index.html
index c11b508..19a43a4 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -53,7 +53,7 @@ entirely compatible with advanced mdev usage such as
The Linux kernel must be 2.6.10 or later.
GNU make, version 3.81 or later
skalibs version
-2.6.0.2 or later. It's a build-time requirement. It's also a run-time
+2.6.3.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library.
@@ -69,7 +69,7 @@ library.
- The current released version of mdevd is
-0.0.1.0.
+0.1.0.0.
- Alternatively, you can checkout a copy of the
mdevd
git repository:
@@ -100,7 +100,6 @@ the previous versions of mdevd and the current one.
diff --git a/doc/mdevd-coldplug.html b/doc/mdevd-coldplug.html
index fbbb5aa..027c849 100644
--- a/doc/mdevd-coldplug.html
+++ b/doc/mdevd-coldplug.html
@@ -21,8 +21,8 @@
mdevd-coldplug performs a coldplug: it scans
/sys for all registered devices a uevent manager would
-want to perform actions on, and generates uevents for all these
-devices.
+want to perform actions on, and tells the kernel to generate uevents
+for all these devices.
Interface
@@ -33,17 +33,13 @@ devices.
- mdevd-coldplug scans /sys for devices.
- - For every suitable device it finds, it generates a
-uevent and writes it to its stdout, using the same format
-as mdevd-netlink.
- - It exits when it has finished scanning.
+ - For every suitable device it finds, it tells the kernel
+to generate an event. If a device manager such as
+as mdevd is listening to the netlink
+at this point, it will pick up the series of events.
+ - mdevd-coldplug exits when it has finished scanning.
-
- This implies that the mdevd-coldplug | mdevd command line
-will function as a coldplug manager, just like mdev -s.
-
-
Options
@@ -62,12 +58,7 @@ pseudo-filesystem is mounted on slashsys. Default is /sys.
- mdevd-coldplug is a short-lived program, just like
-mdev -s.
- - Unlike mdev -s, however, mdevd-coldplug does
-not act on the uevents it generates. It simply prints them.
-This allows for easy debugging.
- - To act on the uevents, simply pipe the output of
-mdevd-coldplug into mdevd.
+mdev -s or udevadm trigger.
-
-
-mdevd
-Software
-skarnet.org
-
-
- The mdevd-netlink program
-
-
-mdevd-netlink listens to the netlink interface for uevents
-(also called "hotplug" or "udev" events), and writes those uevents to
-its standard output, using a simple format.
-
-
-
-mdevd expects uevents in the same
-format mdevd-netlink writes them. So the
-mdevd-netlink | mdevd command line will function as
-a daemon reading uevents from the netlink and handling them.
-
-
- Interface
-
-
- mdevd-netlink [ -d notif ] [ -v verbosity ] [ -b kbufsz ]
-
-
-
- - mdevd-netlink binds to the netlink interface and listens for
-hotplug events, as the udevd program does.
- - It writes event information to its stdout. The output contains
-null characters, so a terminal will not display them correctly. To
-properly use mdevd-netlink, it should be piped into a handler
-program such as mdevd.
- - mdevd-netlink is a long-lived program.
-When it receives a SIGTERM, it stops listening to hotplug events;
-it will exit as soon as it has flushed its event queue to stdout.
-
-
- Options
-
-
- - -d notif : when ready (actually
-listening to the netlink), write a newline to file descriptor notif
-then close it. This allows mdevd-netlink to use the
-s6 mechanism to
-notify readiness. notif cannot be lesser than 3. If this
-option is not given, no readiness notification is sent.
- - -v verbosity : be more or less verbose.
-Default verbosity is 1. 0 will only print fatal error messages, 3 will
-print warnings every time the netlink interface sends something
-unexpected.
- - -b kbufsz : try and reserve a kernel buffer of
-kbufsz bytes for the netlink queue. Too large a buffer wastes kernel memory;
-too small a buffer risks losing events. The default is 65536 (which is on
-the large side).
-
-
- Protocol
-
-
-
- Notes
-
-
- - mdevd-netlink is a daemon; it should be run under a proper supervision system such
-as s6.
-- If you are running mdevd-netlink, the program you pipe its
-output into should be the only program handling uevents; that means
-that /proc/sys/kernel/hotplug should be empty.
-- The mdevd-netlink | mdevd command line is a quick
-way of running a uevent manager, but there are ways to improve it:
-
- - Using the
-execline scripting
-language, the pipeline { mdevd-netlink } mdevd command
-line will avoid leaving a shell around.
- - The best way to use mdevd-netlink and mdevd is with a
-supervision system:
-under s6 or
-s6-rc, write a service
-pipeline where mdevd-netlink is a producer and
-mdevd is a consumer. This setup has the advantage, among
-others, that you can restart the netlink listener and the event handler
-separately. The examples/ subdirectory of the mdevd
-package contains example configurations for such a setup.
-
-
-
-
diff --git a/doc/mdevd-netlink.html b/doc/mdevd-netlink.html
deleted file mode 100644
index d0aa054..0000000
--- a/doc/mdevd-netlink.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-