Author: mjg
Date: Mon Mar 31 02:53:15 2014
New Revision: 263963
URL: http://svnweb.freebsd.org/changeset/base/263963

Log:
  MFC r263758:
  Update userspace users of hw.bus.devctl_disable.
  
  This switches the code to use hw.bus.devctl_queue instead.

Modified:
  stable/10/etc/rc.d/devd
  stable/10/sbin/devd/devd.cc
  stable/10/share/man/man4/devctl.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/devd
==============================================================================
--- stable/10/etc/rc.d/devd     Mon Mar 31 02:44:43 2014        (r263962)
+++ stable/10/etc/rc.d/devd     Mon Mar 31 02:53:15 2014        (r263963)
@@ -30,9 +30,10 @@ devd_prestart()
 {
        find_pidfile
 
-       # If devd is disabled, turn it off in the kernel to avoid memory leaks.
+       # If devd is disabled, turn it off in the kernel to avoid unnecessary
+       # memory usage.
        if ! checkyesno ${rcvar}; then
-           $SYSCTL hw.bus.devctl_disable=1
+           $SYSCTL hw.bus.devctl_queue=0
        fi
 }
 

Modified: stable/10/sbin/devd/devd.cc
==============================================================================
--- stable/10/sbin/devd/devd.cc Mon Mar 31 02:44:43 2014        (r263962)
+++ stable/10/sbin/devd/devd.cc Mon Mar 31 02:53:15 2014        (r263963)
@@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$");
 
 #define PIPE "/var/run/devd.pipe"
 #define CF "/etc/devd.conf"
-#define SYSCTL "hw.bus.devctl_disable"
+#define SYSCTL "hw.bus.devctl_queue"
 
 /*
  * Since the client socket is nonblocking, we must increase its send buffer to
@@ -1164,9 +1164,9 @@ check_devd_enabled()
        len = sizeof(val);
        if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0)
                errx(1, "devctl sysctl missing from kernel!");
-       if (val) {
-               warnx("Setting " SYSCTL " to 0");
-               val = 0;
+       if (val == 0) {
+               warnx("Setting " SYSCTL " to 1000");
+               val = 1000;
                sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val));
        }
 }

Modified: stable/10/share/man/man4/devctl.4
==============================================================================
--- stable/10/share/man/man4/devctl.4   Mon Mar 31 02:44:43 2014        
(r263962)
+++ stable/10/share/man/man4/devctl.4   Mon Mar 31 02:53:15 2014        
(r263963)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 11, 2003
+.Dd March 26, 2014
 .Dt DEVCTL 4
 .Os
 .Sh NAME
@@ -73,9 +73,9 @@ If you try to read this device a charact
 the rest of the data.
 Listening programs are expected to cope.
 .Pp
-The sysctl and boot parameter
-.Va hw.bus.devctl_disable
-is used to disable
+The sysctl
+.Va hw.bus.devctl_queue
+can be used to control queue length. It is set to 0 to disable
 .Nm
 when no
 .Xr devd 8
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to