From owner-svn-src-head@FreeBSD.ORG Wed Mar 26 02:25:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A44F82C9; Wed, 26 Mar 2014 02:25:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84A238DC; Wed, 26 Mar 2014 02:25:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2Q2Pfo7025723; Wed, 26 Mar 2014 02:25:41 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2Q2PeTM025717; Wed, 26 Mar 2014 02:25:40 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201403260225.s2Q2PeTM025717@svn.freebsd.org> From: Mateusz Guzik Date: Wed, 26 Mar 2014 02:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263758 - in head: etc/rc.d sbin/devd share/man/man4 tools/tools/sysdoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 02:25:41 -0000 Author: mjg Date: Wed Mar 26 02:25:40 2014 New Revision: 263758 URL: http://svnweb.freebsd.org/changeset/base/263758 Log: Update userspace users of hw.bus.devctl_disable. This fixes breakage resulting from r263754. Reported by: AN Reviewed by: imp Pointy hat to: me Modified: head/etc/rc.d/devd head/sbin/devd/devd.cc head/share/man/man4/devctl.4 head/tools/tools/sysdoc/tunables.mdoc Modified: head/etc/rc.d/devd ============================================================================== --- head/etc/rc.d/devd Wed Mar 26 01:36:00 2014 (r263757) +++ head/etc/rc.d/devd Wed Mar 26 02:25:40 2014 (r263758) @@ -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: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed Mar 26 01:36:00 2014 (r263757) +++ head/sbin/devd/devd.cc Wed Mar 26 02:25:40 2014 (r263758) @@ -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: head/share/man/man4/devctl.4 ============================================================================== --- head/share/man/man4/devctl.4 Wed Mar 26 01:36:00 2014 (r263757) +++ head/share/man/man4/devctl.4 Wed Mar 26 02:25:40 2014 (r263758) @@ -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 Modified: head/tools/tools/sysdoc/tunables.mdoc ============================================================================== --- head/tools/tools/sysdoc/tunables.mdoc Wed Mar 26 01:36:00 2014 (r263757) +++ head/tools/tools/sysdoc/tunables.mdoc Wed Mar 26 02:25:40 2014 (r263758) @@ -233,16 +233,6 @@ See for more information. --- -hw.bus.devctl_disable -bool - -This can be used to turn off -.Xr devctl 4 -when no -.Xr devd 8 -is running. - ---- hw.bus.devices ---