summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-01-16 00:22:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-01-16 00:22:38 +0000
commit1a25a5ae57ab9620df1596c83cb1ea2897be9279 (patch)
tree76fc324fd01482dab658782059126a1beca84e43
parent696245ec359b1083886b558ef41f9fcae437a088 (diff)
downloadmdevd-1a25a5ae57ab9620df1596c83cb1ea2897be9279.tar.gz
mdevd-1a25a5ae57ab9620df1596c83cb1ea2897be9279.tar.xz
mdevd-1a25a5ae57ab9620df1596c83cb1ea2897be9279.zip
Increase default kbufsz again, to 500 kB
-rw-r--r--doc/mdevd.html5
-rw-r--r--src/mdevd/mdevd.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/mdevd.html b/doc/mdevd.html
index 55d1456..1a271c5 100644
--- a/doc/mdevd.html
+++ b/doc/mdevd.html
@@ -91,8 +91,9 @@ readiness</a>. <em>notif</em> cannot be lesser than 3.
 If this option is not given, no readiness notification is sent. </li>
  <li> <tt>-b</tt>&nbsp;<em>kbufsz</em>&nbsp;: try and reserve a kernel buffer of
 <em>kbufsz</em> bytes for the netlink queue. Too large a buffer wastes kernel memory;
-too small a buffer risks losing events. The default is 196608
-(192 kB, which is on the large side for average systems). </li>
+too small a buffer risks losing events. The default is 500 kB, which should be
+enough for most systems; if you're getting "No buffer space available" errors
+from mdevd at coldplug time, try increasing this number. </li>
  <li> <tt>-n</tt>&nbsp;: dry run. mdevd will not create or delete
 device nodes, and it will not spawn commands. Instead, it will print to stdout
 the actions it would have performed. </li>
diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c
index ed83384..54e5cf6 100644
--- a/src/mdevd/mdevd.c
+++ b/src/mdevd/mdevd.c
@@ -990,7 +990,7 @@ int main (int argc, char const *const *argv)
   char const *configfile = "/etc/mdev.conf" ;
   iopause_fd x[2] = { { .events = IOPAUSE_READ }, { .events = IOPAUSE_READ } } ;
   unsigned int notif = 0 ;
-  unsigned int kbufsz = 196608 ;
+  unsigned int kbufsz = 512288 ;
   char const *slashdev = "/dev" ;
   PROG = "mdevd" ;
   {