From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 00:19:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB73106566B; Sun, 2 Aug 2009 00:19:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 276B48FC16; Sun, 2 Aug 2009 00:19:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n720JaU9096745; Sun, 2 Aug 2009 00:19:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n720JaVH096738; Sun, 2 Aug 2009 00:19:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908020019.n720JaVH096738@svn.freebsd.org> From: Robert Watson Date: Sun, 2 Aug 2009 00:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196027 - in vendor/openbsm/dist: . etc tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 00:19:37 -0000 Author: rwatson Date: Sun Aug 2 00:19:36 2009 New Revision: 196027 URL: http://svn.freebsd.org/changeset/base/196027 Log: Vendor import of OpenBSM 1.1p2, which incorporates the following changes since the last imported OpenBSM release: OpenBSM 1.1p2 - Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. - Fix build on Linux. - Fix printing of class masks in the audump tool. Obtained from: TrustedBSD Project Modified: vendor/openbsm/dist/NEWS vendor/openbsm/dist/README vendor/openbsm/dist/VERSION vendor/openbsm/dist/configure vendor/openbsm/dist/configure.ac vendor/openbsm/dist/etc/audit_event vendor/openbsm/dist/tools/audump.c Modified: vendor/openbsm/dist/NEWS ============================================================================== --- vendor/openbsm/dist/NEWS Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/NEWS Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,11 @@ OpenBSM Version History +OpenBSM 1.1p2 + +- Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. +- Fix build on Linux. +- Fix printing of class masks in the audump tool. + OpenBSM 1.1p1 - Fixes to AUT_SOCKUNIX token parsing. @@ -458,4 +464,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#42 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#43 $ Modified: vendor/openbsm/dist/README ============================================================================== --- vendor/openbsm/dist/README Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/README Sun Aug 2 00:19:36 2009 (r196027) @@ -1,4 +1,4 @@ -OpenBSM 1.1 +OpenBSM 1.1p2 Introduction @@ -64,4 +64,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#36 $ +$P4: //depot/projects/trustedbsd/openbsm/README#37 $ Modified: vendor/openbsm/dist/VERSION ============================================================================== --- vendor/openbsm/dist/VERSION Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/VERSION Sun Aug 2 00:19:36 2009 (r196027) @@ -1 +1 @@ -OPENBSM_1_1p1 +OPENBSM_1_1p2 Modified: vendor/openbsm/dist/configure ============================================================================== --- vendor/openbsm/dist/configure Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/configure Sun Aug 2 00:19:36 2009 (r196027) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p1. +# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p2. # # Report bugs to . # @@ -751,8 +751,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenBSM' PACKAGE_TARNAME='openbsm' -PACKAGE_VERSION='1.1p1' -PACKAGE_STRING='OpenBSM 1.1p1' +PACKAGE_VERSION='1.1p2' +PACKAGE_STRING='OpenBSM 1.1p2' PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org' ac_unique_file="bin/auditreduce/auditreduce.c" @@ -1492,7 +1492,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenBSM 1.1p1 to adapt to many kinds of systems. +\`configure' configures OpenBSM 1.1p2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1562,7 +1562,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenBSM 1.1p1:";; + short | recursive ) echo "Configuration of OpenBSM 1.1p2:";; esac cat <<\_ACEOF @@ -1671,7 +1671,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenBSM configure 1.1p1 +OpenBSM configure 1.1p2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1685,7 +1685,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenBSM $as_me 1.1p1, which was +It was created by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -19662,7 +19662,7 @@ fi # Define the identity of the package. PACKAGE=OpenBSM - VERSION=1.1p1 + VERSION=1.1p2 cat >>confdefs.h <<_ACEOF @@ -24400,7 +24400,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenBSM $as_me 1.1p1, which was +This file was extended by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24453,7 +24453,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenBSM config.status 1.1p1 +OpenBSM config.status 1.1p2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/openbsm/dist/configure.ac ============================================================================== --- vendor/openbsm/dist/configure.ac Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/configure.ac Sun Aug 2 00:19:36 2009 (r196027) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.1p1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 $]) +AC_INIT([OpenBSM], [1.1p2], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#54 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) Modified: vendor/openbsm/dist/etc/audit_event ============================================================================== --- vendor/openbsm/dist/etc/audit_event Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/etc/audit_event Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#40 $ +# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#41 $ # # The mapping between event identifiers and values is also hard-coded in # audit_kevents.h and audit_uevents.h, so changes must occur in both places, @@ -271,7 +271,8 @@ 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm 278:AUE_OPENAT_RW:openat(2) - read,write:fr,fw 279:AUE_OPENAT_RWC:openat(2) - read,write,create:fc,fw,fr,fa,fm -280:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm +280:AUE_OPENAT_RWT:openat(2) - read,write,trunc:fd,fw,fr,fa,fm +281:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm 282:AUE_RENAMEAT:renameat(2):fc,fd 283:AUE_FSTATAT:fstatat(2):fa 284:AUE_FCHOWNAT:fchownat(2):fm Modified: vendor/openbsm/dist/tools/audump.c ============================================================================== --- vendor/openbsm/dist/tools/audump.c Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/tools/audump.c Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2006 Robert N. M. Watson + * Copyright (c) 2005-2009 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#8 $ + * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#9 $ */ #include @@ -165,16 +165,16 @@ printf_classmask(au_class_t classmask) first = 1; for (i = 0; i < 32; i++) { - if (classmask & (2 << i)) { + if (classmask & (1 << i)) { if (first) first = 0; else printf(","); - c = getauclassnum(2 << i); + c = getauclassnum(1 << i); if (c != NULL) printf("%s", c->ac_name); else - printf("0x%x", 2 << i); + printf("0x%x", 1 << i); } } } From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 00:20:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED1B01065670; Sun, 2 Aug 2009 00:20:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C13628FC14; Sun, 2 Aug 2009 00:20:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n720KeT5096821; Sun, 2 Aug 2009 00:20:40 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n720KexG096820; Sun, 2 Aug 2009 00:20:40 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908020020.n720KexG096820@svn.freebsd.org> From: Robert Watson Date: Sun, 2 Aug 2009 00:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196028 - vendor/openbsm/1.1-P-2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 00:20:41 -0000 Author: rwatson Date: Sun Aug 2 00:20:40 2009 New Revision: 196028 URL: http://svn.freebsd.org/changeset/base/196028 Log: Tag OpenBSM 1.1p2 vendor import. Added: vendor/openbsm/1.1-P-2/ - copied from r196027, vendor/openbsm/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 10:27:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A762106564A; Sun, 2 Aug 2009 10:27:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56D978FC1C; Sun, 2 Aug 2009 10:27:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72ARt9v012178; Sun, 2 Aug 2009 10:27:55 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72ARtPi012169; Sun, 2 Aug 2009 10:27:55 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908021027.n72ARtPi012169@svn.freebsd.org> From: Robert Watson Date: Sun, 2 Aug 2009 10:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196031 - in head/contrib/openbsm: . config etc tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 10:27:55 -0000 Author: rwatson Date: Sun Aug 2 10:27:54 2009 New Revision: 196031 URL: http://svn.freebsd.org/changeset/base/196031 Log: Import OpenBSM 1.1p2 from vendor branch to 8-CURRENT. This patch release addresses several minor issues: - Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. - Fix build on Linux. - Fix printing of class masks in the audump tool. MFC after: 3 weeks Obtained from: TrustedBSD Project Approved by: re (kib) Modified: head/contrib/openbsm/ (props changed) head/contrib/openbsm/NEWS head/contrib/openbsm/README head/contrib/openbsm/VERSION head/contrib/openbsm/config/config.h head/contrib/openbsm/configure head/contrib/openbsm/configure.ac head/contrib/openbsm/etc/audit_event head/contrib/openbsm/tools/audump.c Modified: head/contrib/openbsm/NEWS ============================================================================== --- head/contrib/openbsm/NEWS Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/NEWS Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,11 @@ OpenBSM Version History +OpenBSM 1.1p2 + +- Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. +- Fix build on Linux. +- Fix printing of class masks in the audump tool. + OpenBSM 1.1p1 - Fixes to AUT_SOCKUNIX token parsing. @@ -458,4 +464,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#42 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#43 $ Modified: head/contrib/openbsm/README ============================================================================== --- head/contrib/openbsm/README Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/README Sun Aug 2 10:27:54 2009 (r196031) @@ -1,4 +1,4 @@ -OpenBSM 1.1 +OpenBSM 1.1p2 Introduction @@ -64,4 +64,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#36 $ +$P4: //depot/projects/trustedbsd/openbsm/README#37 $ Modified: head/contrib/openbsm/VERSION ============================================================================== --- head/contrib/openbsm/VERSION Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/VERSION Sun Aug 2 10:27:54 2009 (r196031) @@ -1 +1 @@ -OPENBSM_1_1p1 +OPENBSM_1_1p2 Modified: head/contrib/openbsm/config/config.h ============================================================================== --- head/contrib/openbsm/config/config.h Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/config/config.h Sun Aug 2 10:27:54 2009 (r196031) @@ -164,13 +164,13 @@ #define PACKAGE_NAME "OpenBSM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "OpenBSM 1.1p1" +#define PACKAGE_STRING "OpenBSM 1.1p2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "openbsm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1p1" +#define PACKAGE_VERSION "1.1p2" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -191,7 +191,7 @@ #define USE_NATIVE_INCLUDES /**/ /* Version number of package */ -#define VERSION "1.1p1" +#define VERSION "1.1p2" /* Use extended API on platforms that require it */ #define _GNU_SOURCE /**/ Modified: head/contrib/openbsm/configure ============================================================================== --- head/contrib/openbsm/configure Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/configure Sun Aug 2 10:27:54 2009 (r196031) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p1. +# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p2. # # Report bugs to . # @@ -751,8 +751,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenBSM' PACKAGE_TARNAME='openbsm' -PACKAGE_VERSION='1.1p1' -PACKAGE_STRING='OpenBSM 1.1p1' +PACKAGE_VERSION='1.1p2' +PACKAGE_STRING='OpenBSM 1.1p2' PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org' ac_unique_file="bin/auditreduce/auditreduce.c" @@ -1492,7 +1492,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenBSM 1.1p1 to adapt to many kinds of systems. +\`configure' configures OpenBSM 1.1p2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1562,7 +1562,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenBSM 1.1p1:";; + short | recursive ) echo "Configuration of OpenBSM 1.1p2:";; esac cat <<\_ACEOF @@ -1671,7 +1671,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenBSM configure 1.1p1 +OpenBSM configure 1.1p2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1685,7 +1685,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenBSM $as_me 1.1p1, which was +It was created by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -19662,7 +19662,7 @@ fi # Define the identity of the package. PACKAGE=OpenBSM - VERSION=1.1p1 + VERSION=1.1p2 cat >>confdefs.h <<_ACEOF @@ -24400,7 +24400,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenBSM $as_me 1.1p1, which was +This file was extended by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24453,7 +24453,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenBSM config.status 1.1p1 +OpenBSM config.status 1.1p2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: head/contrib/openbsm/configure.ac ============================================================================== --- head/contrib/openbsm/configure.ac Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/configure.ac Sun Aug 2 10:27:54 2009 (r196031) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.1p1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 $]) +AC_INIT([OpenBSM], [1.1p2], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#54 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) Modified: head/contrib/openbsm/etc/audit_event ============================================================================== --- head/contrib/openbsm/etc/audit_event Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/etc/audit_event Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#40 $ +# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#41 $ # $FreeBSD$ # # The mapping between event identifiers and values is also hard-coded in @@ -272,7 +272,8 @@ 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm 278:AUE_OPENAT_RW:openat(2) - read,write:fr,fw 279:AUE_OPENAT_RWC:openat(2) - read,write,create:fc,fw,fr,fa,fm -280:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm +280:AUE_OPENAT_RWT:openat(2) - read,write,trunc:fd,fw,fr,fa,fm +281:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm 282:AUE_RENAMEAT:renameat(2):fc,fd 283:AUE_FSTATAT:fstatat(2):fa 284:AUE_FCHOWNAT:fchownat(2):fm Modified: head/contrib/openbsm/tools/audump.c ============================================================================== --- head/contrib/openbsm/tools/audump.c Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/tools/audump.c Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2006 Robert N. M. Watson + * Copyright (c) 2005-2009 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#8 $ + * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#9 $ */ #include @@ -165,16 +165,16 @@ printf_classmask(au_class_t classmask) first = 1; for (i = 0; i < 32; i++) { - if (classmask & (2 << i)) { + if (classmask & (1 << i)) { if (first) first = 0; else printf(","); - c = getauclassnum(2 << i); + c = getauclassnum(1 << i); if (c != NULL) printf("%s", c->ac_name); else - printf("0x%x", 2 << i); + printf("0x%x", 1 << i); } } } From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 10:48:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A1CB106564A; Sun, 2 Aug 2009 10:48:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272508FC08; Sun, 2 Aug 2009 10:48:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72AmP32012659; Sun, 2 Aug 2009 10:48:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72AmPJh012657; Sun, 2 Aug 2009 10:48:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200908021048.n72AmPJh012657@svn.freebsd.org> From: Xin LI Date: Sun, 2 Aug 2009 10:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196032 - in stable/7/sys: . contrib/pf dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 10:48:27 -0000 Author: delphij Date: Sun Aug 2 10:48:25 2009 New Revision: 196032 URL: http://svn.freebsd.org/changeset/base/196032 Log: MFC r195275: Use MPT_MAX_LUNS as maximium number of LUNs, not 7, for SAS and FC cases. This matches Linux driver behavior (except SPI case). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mpt/mpt_cam.c Modified: stable/7/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_cam.c Sun Aug 2 10:27:54 2009 (r196031) +++ stable/7/sys/dev/mpt/mpt_cam.c Sun Aug 2 10:48:25 2009 (r196032) @@ -3605,7 +3605,10 @@ mpt_action(struct cam_sim *sim, union cc if (mpt->is_spi && cpi->max_target > 15) { cpi->max_target = 15; } - cpi->max_lun = 7; + if (mpt->is_spi) + cpi->max_lun = 7; + else + cpi->max_lun = MPT_MAX_LUNS; cpi->initiator_id = mpt->mpt_ini_id; cpi->bus_id = cam_sim_bus(sim); From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 11:26:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7291F106564A; Sun, 2 Aug 2009 11:26:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 609508FC15; Sun, 2 Aug 2009 11:26:23 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72BQNfA013410; Sun, 2 Aug 2009 11:26:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72BQNfU013407; Sun, 2 Aug 2009 11:26:23 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200908021126.n72BQNfU013407@svn.freebsd.org> From: Ed Schouten Date: Sun, 2 Aug 2009 11:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196033 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 11:26:23 -0000 Author: ed Date: Sun Aug 2 11:26:23 2009 New Revision: 196033 URL: http://svn.freebsd.org/changeset/base/196033 Log: Make the MacBook3,1 boot again. Approved by: re (kib) Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Aug 2 10:48:25 2009 (r196032) +++ head/sys/amd64/amd64/machdep.c Sun Aug 2 11:26:23 2009 (r196033) @@ -214,6 +214,7 @@ cpu_startup(dummy) sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || + strncmp(sysenv, "MacBook3,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Aug 2 10:48:25 2009 (r196032) +++ head/sys/i386/i386/machdep.c Sun Aug 2 11:26:23 2009 (r196033) @@ -258,6 +258,7 @@ cpu_startup(dummy) sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || + strncmp(sysenv, "MacBook3,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 14:25:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E25E1065670; Sun, 2 Aug 2009 14:25:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0FBC8FC08; Sun, 2 Aug 2009 14:25:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72EPQ4Q016874; Sun, 2 Aug 2009 14:25:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72EPQ8T016871; Sun, 2 Aug 2009 14:25:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200908021425.n72EPQ8T016871@svn.freebsd.org> From: Ed Schouten Date: Sun, 2 Aug 2009 14:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196036 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 14:25:27 -0000 Author: ed Date: Sun Aug 2 14:25:26 2009 New Revision: 196036 URL: http://svn.freebsd.org/changeset/base/196036 Log: Fix two bugs related to TTY input: - fix write() on pseudo-terminal masters to return the amount of bytes passed to the TTY, not the amount of bytes read from user. - fix ttydisc_rint_bypass() to set the high watermark when it cannot write all input, just like ttydisc_rint() itself. Approved by: re (kib) Modified: head/sys/kern/tty_pts.c head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Aug 2 13:37:00 2009 (r196035) +++ head/sys/kern/tty_pts.c Sun Aug 2 14:25:26 2009 (r196036) @@ -204,8 +204,10 @@ ptsdev_write(struct file *fp, struct uio error = uiomove(ib, iblen, uio); tty_lock(tp); - if (error != 0) + if (error != 0) { + iblen = 0; goto done; + } /* * When possible, avoid the slow path. rint_bypass() @@ -260,6 +262,12 @@ ptsdev_write(struct file *fp, struct uio done: ttydisc_rint_done(tp); tty_unlock(tp); + + /* + * Don't account for the part of the buffer that we couldn't + * pass to the TTY. + */ + uio->uio_resid += iblen; return (error); } Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Sun Aug 2 13:37:00 2009 (r196035) +++ head/sys/kern/tty_ttydisc.c Sun Aug 2 14:25:26 2009 (r196036) @@ -1060,6 +1060,8 @@ ttydisc_rint_bypass(struct tty *tp, cons ret = ttyinq_write(&tp->t_inq, buf, len, 0); ttyinq_canonicalize(&tp->t_inq); + if (ret < len) + tty_hiwat_in_block(tp); return (ret); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 14:28:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F3C106566B; Sun, 2 Aug 2009 14:28:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741C58FC08; Sun, 2 Aug 2009 14:28:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72ESf94016999; Sun, 2 Aug 2009 14:28:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72ESeGr016971; Sun, 2 Aug 2009 14:28:40 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908021428.n72ESeGr016971@svn.freebsd.org> From: Attilio Rao Date: Sun, 2 Aug 2009 14:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196037 - in head/sys: dev/aac dev/acpica dev/adb dev/amdtemp dev/amr dev/ata dev/atkbdc dev/bktr dev/drm dev/ips dev/mfi dev/mlx dev/mmc dev/pccbb dev/pst dev/rp dev/sound/pci/hda dev/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 14:28:42 -0000 Author: attilio Date: Sun Aug 2 14:28:40 2009 New Revision: 196037 URL: http://svn.freebsd.org/changeset/base/196037 Log: Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra , Brandon Gooch Sponsored by: Yahoo! Incorporated Approved by: re (ksmith) Modified: head/sys/dev/aac/aac.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_battery.c head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_dock.c head/sys/dev/acpica/acpi_thermal.c head/sys/dev/adb/adb_bus.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/amr/amr.c head/sys/dev/ata/ata-all.c head/sys/dev/atkbdc/psm.c head/sys/dev/bktr/bktr_os.c head/sys/dev/drm/drm_drv.c head/sys/dev/ips/ips_pci.c head/sys/dev/mfi/mfi.c head/sys/dev/mlx/mlx.c head/sys/dev/mmc/mmc.c head/sys/dev/pccbb/pccbb.c head/sys/dev/pst/pst-iop.c head/sys/dev/rp/rp.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/twe/twe.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_handle_request.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/netback/netback.c head/sys/i386/acpica/acpi_machdep.c head/sys/i386/bios/smapi.c head/sys/i386/bios/smbios.c head/sys/i386/bios/vpd.c head/sys/kern/subr_bus.c head/sys/pc98/cbus/fdc.c head/sys/sys/bus.h head/sys/sys/param.h head/sys/xen/xenbus/xenbus_probe.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/aac/aac.c Sun Aug 2 14:28:40 2009 (r196037) @@ -3270,10 +3270,10 @@ aac_handle_aif(struct aac_softc *sc, str while (co != NULL) { if (co->co_found == 0) { mtx_unlock(&sc->aac_io_lock); - mtx_lock(&Giant); + newbus_xlock(); device_delete_child(sc->aac_dev, co->co_disk); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->aac_io_lock); co_next = TAILQ_NEXT(co, co_link); mtx_lock(&sc->aac_container_lock); @@ -3291,9 +3291,9 @@ aac_handle_aif(struct aac_softc *sc, str /* Attach the newly created containers */ if (added) { mtx_unlock(&sc->aac_io_lock); - mtx_lock(&Giant); + newbus_xlock(); bus_generic_attach(sc->aac_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->aac_io_lock); } Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi.c Sun Aug 2 14:28:40 2009 (r196037) @@ -675,8 +675,6 @@ acpi_suspend(device_t dev) device_t child, *devlist; int error, i, numdevs, pstate; - GIANT_REQUIRED; - /* First give child devices a chance to suspend. */ error = bus_generic_suspend(dev); if (error) @@ -719,8 +717,6 @@ acpi_resume(device_t dev) int i, numdevs, error; device_t child, *devlist; - GIANT_REQUIRED; - /* * Put all devices in D0 before resuming them. Call _S0D on each one * since some systems expect this. @@ -745,8 +741,6 @@ static int acpi_shutdown(device_t dev) { - GIANT_REQUIRED; - /* Allow children to shutdown first. */ bus_generic_shutdown(dev); @@ -2534,11 +2528,7 @@ acpi_EnterSleepState(struct acpi_softc * thread_unlock(curthread); #endif - /* - * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE - * drivers need this. - */ - mtx_lock(&Giant); + newbus_xlock(); slp_state = ACPI_SS_NONE; @@ -2611,7 +2601,7 @@ backout: if (slp_state >= ACPI_SS_SLEPT) acpi_enable_fixed_events(sc); - mtx_unlock(&Giant); + newbus_xunlock(); #ifdef SMP thread_lock(curthread); Modified: head/sys/dev/acpica/acpi_battery.c ============================================================================== --- head/sys/dev/acpica/acpi_battery.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_battery.c Sun Aug 2 14:28:40 2009 (r196037) @@ -329,6 +329,7 @@ acpi_battery_find_dev(u_int logical_unit dev = NULL; found_unit = 0; + newbus_slock(); batt_dc = devclass_find("battery"); maxunit = devclass_get_maxunit(batt_dc); for (i = 0; i < maxunit; i++) { @@ -340,6 +341,7 @@ acpi_battery_find_dev(u_int logical_unit found_unit++; dev = NULL; } + newbus_sunlock(); return (dev); } @@ -369,13 +371,17 @@ acpi_battery_ioctl(u_long cmd, caddr_t a */ switch (cmd) { case ACPIIO_BATT_GET_UNITS: + newbus_slock(); *(int *)addr = acpi_battery_get_units(); + newbus_sunlock(); error = 0; break; case ACPIIO_BATT_GET_BATTINFO: if (dev != NULL || unit == ACPI_BATTERY_ALL_UNITS) { bzero(&ioctl_arg->battinfo, sizeof(ioctl_arg->battinfo)); + newbus_slock(); error = acpi_battery_get_battinfo(dev, &ioctl_arg->battinfo); + newbus_sunlock(); } break; case ACPIIO_BATT_GET_BIF: @@ -416,6 +422,11 @@ acpi_battery_sysctl(SYSCTL_HANDLER_ARGS) { int val, error; + /* + * Tolerate a race here because newbus lock can't be acquired before + * acpi_battery_get_battinfo() as it can create a LOR with the sysctl + * lock. + */ acpi_battery_get_battinfo(NULL, &acpi_battery_battinfo); val = *(u_int *)oidp->oid_arg1; error = sysctl_handle_int(oidp, &val, 0, req); @@ -427,6 +438,10 @@ acpi_battery_units_sysctl(SYSCTL_HANDLER { int count, error; + /* + * Tolerate a race here in order to avoid a LOR between sysctl lock + * and newbus lock. + */ count = acpi_battery_get_units(); error = sysctl_handle_int(oidp, &count, 0, req); return (error); Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_cpu.c Sun Aug 2 14:28:40 2009 (r196037) @@ -732,7 +732,9 @@ acpi_cpu_startup(void *arg) int i; /* Get set of CPU devices */ + newbus_slock(); devclass_get_devices(acpi_cpu_devclass, &cpu_devices, &cpu_ndevices); + newbus_sunlock(); /* * Setup any quirks that might necessary now that we have probed Modified: head/sys/dev/acpica/acpi_dock.c ============================================================================== --- head/sys/dev/acpica/acpi_dock.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_dock.c Sun Aug 2 14:28:40 2009 (r196037) @@ -188,12 +188,12 @@ acpi_dock_attach_later(void *context) dev = (device_t)context; + newbus_xlock(); if (!device_is_enabled(dev)) device_enable(dev); - mtx_lock(&Giant); device_probe_and_attach(dev); - mtx_unlock(&Giant); + newbus_xunlock(); } static ACPI_STATUS @@ -299,11 +299,11 @@ acpi_dock_eject_child(ACPI_HANDLE handle "ejecting device for %s\n", acpi_name(handle)); dev = acpi_get_device(handle); + newbus_xlock(); if (dev != NULL && device_is_attached(dev)) { - mtx_lock(&Giant); device_detach(dev); - mtx_unlock(&Giant); } + newbus_xunlock(); acpi_SetInteger(handle, "_EJ0", 0); out: Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_thermal.c Sun Aug 2 14:28:40 2009 (r196037) @@ -936,6 +936,8 @@ acpi_tz_thread(void *arg) sc = NULL; for (;;) { + newbus_slock(); + /* If the number of devices has changed, re-evaluate. */ if (devclass_get_count(acpi_tz_devclass) != devcount) { if (devs != NULL) { @@ -948,6 +950,7 @@ acpi_tz_thread(void *arg) for (i = 0; i < devcount; i++) sc[i] = device_get_softc(devs[i]); } + newbus_sunlock(); /* Check for temperature events and act on them. */ for (i = 0; i < devcount; i++) { Modified: head/sys/dev/adb/adb_bus.c ============================================================================== --- head/sys/dev/adb/adb_bus.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/adb/adb_bus.c Sun Aug 2 14:28:40 2009 (r196037) @@ -113,6 +113,7 @@ adb_bus_enumerate(void *xdev) uint8_t i, next_free; uint16_t r3; + newbus_xlock(); sc->sc_dev = dev; sc->parent = device_get_parent(dev); @@ -187,6 +188,7 @@ adb_bus_enumerate(void *xdev) } bus_generic_attach(dev); + newbus_xunlock(); config_intrhook_disestablish(&sc->enum_hook); } Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/amdtemp/amdtemp.c Sun Aug 2 14:28:40 2009 (r196037) @@ -269,6 +269,7 @@ amdtemp_intrhook(void *arg) /* * dev.cpu.N.temperature. */ + newbus_xlock(); nexus = device_find_child(root_bus, "nexus", 0); acpi = device_find_child(nexus, "acpi", 0); @@ -285,6 +286,7 @@ amdtemp_intrhook(void *arg) "Max of sensor 0 / 1"); } } + newbus_xunlock(); config_intrhook_disestablish(&sc->sc_ich); } Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/amr/amr.c Sun Aug 2 14:28:40 2009 (r196037) @@ -90,6 +90,10 @@ __FBSDID("$FreeBSD$"); SYSCTL_NODE(_hw, OID_AUTO, amr, CTLFLAG_RD, 0, "AMR driver parameters"); +/* + * In order to get rid of Giant, amr_state should be protected by + * a proper softc lock for the cdev operations. + */ static d_open_t amr_open; static d_close_t amr_close; static d_ioctl_t amr_ioctl; @@ -312,9 +316,11 @@ amr_startup(void *arg) config_intrhook_disestablish(&sc->amr_ich); sc->amr_ich.ich_func = NULL; + newbus_xlock(); /* get up-to-date drive information */ if (amr_query_controller(sc)) { device_printf(sc->amr_dev, "can't scan controller for drives\n"); + newbus_xunlock(); return; } @@ -347,6 +353,7 @@ amr_startup(void *arg) /* interrupts will be enabled before we do anything more */ sc->amr_state |= AMR_STATE_INTEN; + newbus_xunlock(); /* * Start the timeout routine. @@ -434,7 +441,11 @@ static int amr_open(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); + struct amr_softc *sc; + + newbus_slock(); + sc = devclass_get_softc(devclass_find("amr"), unit); + newbus_sunlock(); debug_called(1); @@ -490,7 +501,11 @@ static int amr_close(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); + struct amr_softc *sc; + + newbus_slock(); + sc = devclass_get_softc(devclass_find("amr"), unit); + newbus_sunlock(); debug_called(1); @@ -507,6 +522,7 @@ amr_rescan_drives(struct cdev *dev) struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; int i, error = 0; + newbus_xlock(); sc->amr_state |= AMR_STATE_REMAP_LD; while (sc->amr_busyslots) { device_printf(sc->amr_dev, "idle controller\n"); @@ -530,6 +546,7 @@ amr_rescan_drives(struct cdev *dev) sc->amr_drive[i].al_disk = 0; } } + newbus_xunlock(); shutdown_out: amr_startup(sc); @@ -805,7 +822,9 @@ amr_ioctl(struct cdev *dev, u_long cmd, struct amr_linux_ioctl ali; int adapter, error; + newbus_slock(); devclass = devclass_find("amr"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/ata/ata-all.c Sun Aug 2 14:28:40 2009 (r196037) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); static d_ioctl_t ata_ioctl; static struct cdevsw ata_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, /* we need this as newbus isn't mpsafe */ .d_ioctl = ata_ioctl, .d_name = "ata", }; @@ -204,7 +203,9 @@ ata_conn_event(void *context, int dummy) { device_t dev = (device_t)context; + newbus_xlock(); ata_reinit(dev); + newbus_xunlock(); } int @@ -246,7 +247,6 @@ ata_reinit(device_t dev) /* reinit the children and delete any that fails */ if (!device_get_children(dev, &children, &nchildren)) { - mtx_lock(&Giant); /* newbus suckage it needs Giant */ for (i = 0; i < nchildren; i++) { /* did any children go missing ? */ if (children[i] && device_is_attached(children[i]) && @@ -269,7 +269,6 @@ ata_reinit(device_t dev) } } free(children, M_TEMP); - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ } /* if we still have a good request put it on the queue again */ @@ -395,6 +394,7 @@ ata_ioctl(struct cdev *dev, u_long cmd, int *value = (int *)data; int i, nchildren, error = ENOTTY; + newbus_xlock(); switch (cmd) { case IOCATAGMAXCHANNEL: /* In case we have channel 0..n this will return n+1. */ @@ -405,32 +405,40 @@ ata_ioctl(struct cdev *dev, u_long cmd, case IOCATAREINIT: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = ata_reinit(device); break; case IOCATAATTACH: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = DEVICE_ATTACH(device); break; case IOCATADETACH: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = DEVICE_DETACH(device); break; case IOCATADEVICES: if (devices->channel >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, devices->channel)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } bzero(devices->name[0], 32); bzero(&devices->params[0], sizeof(struct ata_params)); bzero(devices->name[1], 32); @@ -465,6 +473,7 @@ ata_ioctl(struct cdev *dev, u_long cmd, if (ata_raid_ioctl_func) error = ata_raid_ioctl_func(cmd, data); } + newbus_xunlock(); return error; } @@ -572,7 +581,7 @@ ata_boot_attach(void) struct ata_channel *ch; int ctlr; - mtx_lock(&Giant); /* newbus suckage it needs Giant */ + newbus_xlock(); /* kick of probe and attach on all channels */ for (ctlr = 0; ctlr < devclass_get_maxunit(ata_devclass); ctlr++) { @@ -587,8 +596,7 @@ ata_boot_attach(void) free(ata_delayed_attach, M_TEMP); ata_delayed_attach = NULL; } - - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ + newbus_xunlock(); } @@ -717,7 +725,6 @@ ata_identify(device_t dev) if (bootverbose) device_printf(dev, "Identifying devices: %08x\n", ch->devices); - mtx_lock(&Giant); /* Skip existing devices. */ if (!device_get_children(dev, &children, &nchildren)) { for (i = 0; i < nchildren; i++) { @@ -729,10 +736,8 @@ ata_identify(device_t dev) /* Create new devices. */ if (bootverbose) device_printf(dev, "New devices: %08x\n", n); - if (n == 0) { - mtx_unlock(&Giant); + if (n == 0) return (0); - } for (i = 0; i < ATA_PM; ++i) { if (n & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) { int unit = -1; @@ -775,7 +780,6 @@ ata_identify(device_t dev) } bus_generic_probe(dev); bus_generic_attach(dev); - mtx_unlock(&Giant); return 0; } Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/atkbdc/psm.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1488,7 +1488,9 @@ psmopen(struct cdev *dev, int flag, int if (sc->state & PSM_OPEN) return (EBUSY); + newbus_xlock(); device_busy(devclass_get_device(psm_devclass, unit)); + newbus_xunlock(); /* Initialize state */ sc->mode.level = sc->dflt_mode.level; @@ -1643,7 +1645,9 @@ psmclose(struct cdev *dev, int flag, int /* close is almost always successful */ sc->state &= ~PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); + newbus_xlock(); device_unbusy(devclass_get_device(psm_devclass, unit)); + newbus_xunlock(); return (0); } Modified: head/sys/dev/bktr/bktr_os.c ============================================================================== --- head/sys/dev/bktr/bktr_os.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/bktr/bktr_os.c Sun Aug 2 14:28:40 2009 (r196037) @@ -597,7 +597,9 @@ bktr_open( struct cdev *dev, int flags, return( ENXIO ); /* Record that the device is now busy */ + newbus_xlock(); device_busy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); if (bt848_card != -1) { @@ -668,8 +670,11 @@ bktr_open( struct cdev *dev, int flags, } /* If there was an error opening the device, undo the busy status */ - if (result != 0) + if (result != 0) { + newbus_xlock(); device_unbusy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); + } return( result ); } @@ -689,6 +694,7 @@ bktr_close( struct cdev *dev, int flags, /* Get the device data */ bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); if (bktr == NULL) { + /* the device is no longer valid/functioning */ return (ENXIO); } @@ -705,10 +711,11 @@ bktr_close( struct cdev *dev, int flags, break; default: return (ENXIO); - break; } + newbus_xlock(); device_unbusy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); return( result ); } Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/drm/drm_drv.c Sun Aug 2 14:28:40 2009 (r196037) @@ -614,11 +614,13 @@ int drm_open(struct cdev *kdev, int flag if (!retcode) { atomic_inc(&dev->counts[_DRM_STAT_OPENS]); + newbus_xlock(); DRM_LOCK(); device_busy(dev->device); if (!dev->open_count++) retcode = drm_firstopen(dev); DRM_UNLOCK(); + newbus_xunlock(); } return retcode; @@ -632,6 +634,11 @@ void drm_close(void *data) DRM_DEBUG("open_count = %d\n", dev->open_count); + /* + * We require to lock newbus here for handling device_unbusy() and + * avoid a LOR with DRM_LOCK. + */ + newbus_xlock(); DRM_LOCK(); if (dev->driver->preclose != NULL) @@ -708,6 +715,7 @@ void drm_close(void *data) } DRM_UNLOCK(); + newbus_xunlock(); } /* drm_ioctl is called whenever a process performs an ioctl on /dev/drm. Modified: head/sys/dev/ips/ips_pci.c ============================================================================== --- head/sys/dev/ips/ips_pci.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/ips/ips_pci.c Sun Aug 2 14:28:40 2009 (r196037) @@ -173,10 +173,12 @@ ips_intrhook(void *arg) struct ips_softc *sc = (struct ips_softc *)arg; config_intrhook_disestablish(&sc->ips_ich); + newbus_xlock(); if (ips_adapter_init(sc)) ips_pci_free(sc); else sc->configured = 1; + newbus_xunlock(); } static int ips_pci_free(ips_softc_t *sc) Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mfi/mfi.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1327,11 +1327,11 @@ mfi_add_ld_complete(struct mfi_command * mfi_release_command(cm); mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); if ((child = device_add_child(sc->mfi_dev, "mfid", -1)) == NULL) { device_printf(sc->mfi_dev, "Failed to add logical disk\n"); free(ld_info, M_MFIBUF); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); return; } @@ -1339,7 +1339,7 @@ mfi_add_ld_complete(struct mfi_command * device_set_ivars(child, ld_info); device_set_desc(child, "MFI Logical Disk"); bus_generic_attach(sc->mfi_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } @@ -1805,9 +1805,9 @@ mfi_check_command_post(struct mfi_softc KASSERT(ld != NULL, ("volume dissappeared")); if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) { mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); device_delete_child(sc->mfi_dev, ld->ld_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } else mfi_disk_enable(ld); @@ -1815,11 +1815,11 @@ mfi_check_command_post(struct mfi_softc case MFI_DCMD_CFG_CLEAR: if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) { mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); TAILQ_FOREACH_SAFE(ld, &sc->mfi_ld_tqh, ld_link, ldn) { device_delete_child(sc->mfi_dev, ld->ld_dev); } - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } else { TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) @@ -1985,7 +1985,9 @@ mfi_ioctl(struct cdev *dev, u_long cmd, adapter = ioc->mfi_adapter_no; if (device_get_unit(sc->mfi_dev) == 0 && adapter != 0) { + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); sc = devclass_get_softc(devclass, adapter); } mtx_lock(&sc->mfi_io_lock); @@ -2173,7 +2175,9 @@ out: struct mfi_linux_ioc_packet l_ioc; int adapter; + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); @@ -2194,7 +2198,9 @@ out: struct mfi_linux_ioc_aen l_aen; int adapter; + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); Modified: head/sys/dev/mlx/mlx.c ============================================================================== --- head/sys/dev/mlx/mlx.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mlx/mlx.c Sun Aug 2 14:28:40 2009 (r196037) @@ -772,7 +772,9 @@ mlx_ioctl(struct cdev *dev, u_long cmd, * Scan the controller to see whether new drives have appeared. */ case MLX_RESCAN_DRIVES: + newbus_xlock(); mlx_startup(sc); + newbus_xunlock(); return(0); /* Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mmc/mmc.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1496,7 +1496,9 @@ mmc_delayed_attach(void *xsc) { struct mmc_softc *sc = xsc; + newbus_xlock(); mmc_scan(sc); + newbus_xunlock(); config_intrhook_disestablish(&sc->config_intrhook); } Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/pccbb/pccbb.c Sun Aug 2 14:28:40 2009 (r196037) @@ -464,14 +464,7 @@ cbb_event_thread(void *arg) sc->flags |= CBB_KTHREAD_RUNNING; while ((sc->flags & CBB_KTHREAD_DONE) == 0) { mtx_unlock(&sc->mtx); - /* - * We take out Giant here because we need it deep, - * down in the bowels of the vm system for mapping the - * memory we need to read the CIS. In addition, since - * we are adding/deleting devices from the dev tree, - * and that code isn't MP safe, we have to hold Giant. - */ - mtx_lock(&Giant); + newbus_xlock(); status = cbb_get(sc, CBB_SOCKET_STATE); DPRINTF(("Status is 0x%x\n", status)); if (!CBB_CARD_PRESENT(status)) { @@ -497,7 +490,7 @@ cbb_event_thread(void *arg) not_a_card = 0; /* We know card type */ cbb_insert(sc); } - mtx_unlock(&Giant); + newbus_xunlock(); /* * First time through we need to tell mountroot that we're Modified: head/sys/dev/pst/pst-iop.c ============================================================================== --- head/sys/dev/pst/pst-iop.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/pst/pst-iop.c Sun Aug 2 14:28:40 2009 (r196037) @@ -152,7 +152,9 @@ iop_attach(void *arg) break; case I2O_CLASS_RANDOM_BLOCK_STORAGE: + newbus_xlock(); pst_add_raid(sc, &sc->lct[i]); + newbus_xunlock(); break; } } Modified: head/sys/dev/rp/rp.c ============================================================================== --- head/sys/dev/rp/rp.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/rp/rp.c Sun Aug 2 14:28:40 2009 (r196037) @@ -903,7 +903,9 @@ rpopen(struct tty *tp) rp_callout_handle = timeout(rp_do_poll, (void *)NULL, POLL_INTERVAL); + newbus_xlock(); device_busy(rp->rp_ctlp->dev); + newbus_xunlock(); return(0); } @@ -914,7 +916,9 @@ rpclose(struct tty *tp) rp = tty_softc(tp); rphardclose(tp); + newbus_xlock(); device_unbusy(rp->rp_ctlp->dev); + newbus_xunlock(); } static void Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Aug 2 14:28:40 2009 (r196037) @@ -7435,6 +7435,7 @@ hdac_attach2(void *arg) quirks_on, quirks_off); ); + newbus_xlock(); hdac_lock(sc); /* Remove ourselves from the config hooks */ @@ -7674,6 +7675,7 @@ hdac_attach2(void *arg) SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO, "pindump", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev), sysctl_hdac_pindump, "I", "Dump pin states/data"); + newbus_xunlock(); } /**************************************************************************** Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/twe/twe.c Sun Aug 2 14:28:40 2009 (r196037) @@ -294,8 +294,10 @@ twe_init(struct twe_softc *sc) /* * Scan for drives */ + newbus_xlock(); for (i = 0; i < TWE_MAX_UNITS; i++) twe_add_unit(sc, i); + newbus_xunlock(); /* * Initialise connection with controller. @@ -621,11 +623,15 @@ twe_ioctl(struct twe_softc *sc, int ioct break; case TWEIO_ADD_UNIT: + newbus_xlock(); error = twe_add_unit(sc, td->td_unit); + newbus_xunlock(); break; case TWEIO_DEL_UNIT: + newbus_xlock(); error = twe_del_unit(sc, td->td_unit); + newbus_xunlock(); break; /* XXX implement ATA PASSTHROUGH */ Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/controller/usb_controller.c Sun Aug 2 14:28:40 2009 (r196037) @@ -143,9 +143,7 @@ usb_attach(device_t dev) } if (usb_post_init_called) { - mtx_lock(&Giant); usb_attach_sub(dev, bus); - mtx_unlock(&Giant); usb_needs_explore(bus, 1); } return (0); /* return success */ @@ -228,20 +226,13 @@ usb_bus_explore(struct usb_proc_msg *pm) } USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); - /* * First update the USB power state! */ usb_bus_powerd(bus); - /* - * Explore the Root USB HUB. This call can sleep, - * exiting Giant, which is actually Giant. - */ - (udev->hub->explore) (udev); - - mtx_unlock(&Giant); + /* Explore the Root USB HUB. */ + (udev->hub->explore) (udev); USB_BUS_LOCK(bus); } if (bus->bus_roothold != NULL) { @@ -269,7 +260,7 @@ usb_bus_detach(struct usb_proc_msg *pm) device_set_softc(dev, NULL); USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); + newbus_xlock(); /* detach children first */ bus_generic_detach(dev); @@ -281,7 +272,7 @@ usb_bus_detach(struct usb_proc_msg *pm) usb_free_device(udev, USB_UNCFG_FLAG_FREE_EP0); - mtx_unlock(&Giant); + newbus_xunlock(); USB_BUS_LOCK(bus); /* clear bdev variable last */ bus->bdev = NULL; @@ -350,7 +341,7 @@ usb_bus_attach(struct usb_proc_msg *pm) } USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); /* XXX not required by USB */ + newbus_xlock(); /* default power_mask value */ bus->hw_power_state = @@ -383,7 +374,7 @@ usb_bus_attach(struct usb_proc_msg *pm) err = USB_ERR_NOMEM; } - mtx_unlock(&Giant); + newbus_xunlock(); USB_BUS_LOCK(bus); if (err) { @@ -472,7 +463,7 @@ usb_post_init(void *arg) int max; int n; - mtx_lock(&Giant); + newbus_xlock(); usb_devclass_ptr = devclass_find("usbus"); @@ -483,11 +474,8 @@ usb_post_init(void *arg) dev = devclass_get_device(dc, n); if (dev && device_is_attached(dev)) { bus = device_get_ivars(dev); - if (bus) { - mtx_lock(&Giant); + if (bus) usb_attach_sub(dev, bus); - mtx_unlock(&Giant); - } } } } else { @@ -499,7 +487,7 @@ usb_post_init(void *arg) usb_needs_explore_all(); - mtx_unlock(&Giant); + newbus_xunlock(); } SYSINIT(usb_post_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, usb_post_init, NULL); Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/input/ukbd.c Sun Aug 2 14:28:40 2009 (r196037) @@ -745,7 +745,7 @@ ukbd_attach(device_t dev) uint16_t n; uint16_t hid_len; - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); @@ -854,9 +854,6 @@ ukbd_attach(device_t dev) if (bootverbose) { genkbd_diag(kbd, bootverbose); } - /* lock keyboard mutex */ - - mtx_lock(&Giant); /* start the keyboard */ @@ -879,7 +876,7 @@ ukbd_detach(device_t dev) struct ukbd_softc *sc = device_get_softc(dev); int error; - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); DPRINTF("\n"); @@ -916,6 +913,8 @@ ukbd_detach(device_t dev) usb_callout_drain(&sc->sc_callout); + mtx_unlock(&Giant); + DPRINTF("%s: disconnected\n", device_get_nameunit(dev)); @@ -927,9 +926,9 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); - mtx_assert(&Giant, MA_OWNED); - + mtx_lock(&Giant); ukbd_clear_state(&sc->sc_kbd); + mtx_unlock(&Giant); return (0); } Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/net/usb_ethernet.c Sun Aug 2 14:28:40 2009 (r196037) @@ -221,10 +221,10 @@ ue_attach_post_task(struct usb_proc_msg if (ue->ue_methods->ue_mii_upd != NULL && ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ + newbus_xlock(); error = mii_phy_probe(ue->ue_dev, &ue->ue_miibus, ue_ifmedia_upd, ue->ue_methods->ue_mii_sts); - mtx_unlock(&Giant); + newbus_xunlock(); if (error) { device_printf(ue->ue_dev, "MII without any PHY\n"); goto error; @@ -279,9 +279,12 @@ uether_ifdetach(struct usb_ether *ue) /* detach miibus */ if (ue->ue_miibus != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ + + /* + * It is up to the callers to provide the correct + * newbus locking. + */ device_delete_child(ue->ue_dev, ue->ue_miibus); - mtx_unlock(&Giant); } /* detach ethernet */ Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/usb_compat_linux.c Sun Aug 2 14:28:40 2009 (r196037) @@ -215,14 +215,12 @@ usb_linux_probe(device_t dev) if (uaa->usb_mode != USB_MODE_HOST) { return (ENXIO); } - mtx_lock(&Giant); LIST_FOREACH(udrv, &usb_linux_driver_list, linux_driver_list) { if (usb_linux_lookup_id(udrv->id_table, uaa)) { err = 0; break; } } - mtx_unlock(&Giant); return (err); } @@ -239,9 +237,7 @@ usb_linux_get_usb_driver(struct usb_linu { struct usb_driver *udrv; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 16:59:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C17D41065680; Sun, 2 Aug 2009 16:59:02 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFAEF8FC0A; Sun, 2 Aug 2009 16:59:02 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72Gx20P019862; Sun, 2 Aug 2009 16:59:02 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72Gx23r019861; Sun, 2 Aug 2009 16:59:02 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200908021659.n72Gx23r019861@svn.freebsd.org> From: Julian Elischer Date: Sun, 2 Aug 2009 16:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196038 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 16:59:03 -0000 Author: julian Date: Sun Aug 2 16:59:02 2009 New Revision: 196038 URL: http://svn.freebsd.org/changeset/base/196038 Log: Stop uuidgen(2) from crashing in vimage kerenels. make curvnet valid when needed. Reviewed by: bz@ Approved by: re (kib) Modified: head/sys/kern/kern_uuid.c Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Sun Aug 2 14:28:40 2009 (r196037) +++ head/sys/kern/kern_uuid.c Sun Aug 2 16:59:02 2009 (r196038) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,6 +94,7 @@ uuid_node(uint16_t *node) struct sockaddr_dl *sdl; int i; + CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { /* Walk the address list */ @@ -105,6 +107,7 @@ uuid_node(uint16_t *node) bcopy(LLADDR(sdl), node, UUID_NODE_LEN); IF_ADDR_UNLOCK(ifp); IFNET_RUNLOCK(); + CURVNET_RESTORE(); return; } } @@ -115,6 +118,7 @@ uuid_node(uint16_t *node) for (i = 0; i < (UUID_NODE_LEN>>1); i++) node[i] = (uint16_t)arc4random(); *((uint8_t*)node) |= 0x01; + CURVNET_RESTORE(); } /* From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 19:29:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA39106564A; Sun, 2 Aug 2009 19:29:02 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 84EDE8FC14; Sun, 2 Aug 2009 19:29:02 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 57EEC1A3C6C; Sun, 2 Aug 2009 12:29:02 -0700 (PDT) Date: Sun, 2 Aug 2009 12:29:02 -0700 From: Alfred Perlstein To: Robert Watson Message-ID: <20090802192902.GS47463@elvis.mu.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Navdeep Parhar , Hans Petter Selasky Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 19:29:03 -0000 * Robert Watson [090801 15:15] wrote: > > On Sat, 1 Aug 2009, Hans Petter Selasky wrote: > > >>>This has slowed down core dumps very significantly. What used to take > >>>10-15s on my system now takes around 3 minutes. A simple test is to > >>>break into ddb and "call doadump" with or without this rev. I have a > >>>serial console on this machine and so I can use ddb whether the attached > >>>USB keyboard works or not. > > > >It's because there is a DELAY(1000) in the UKBD's polling routine so that > >key- repeating will work, no magic. > > Given a choice between dumping 10x faster and having automatic key repeat > in DDB, I'd lean towards the former. :-) > Robert, and *@freebsd.org, Hans should be back in a day or so to address this. If critical I can probably back out the offending code, but I think it makes sense to wait a few days more for a more comprehensive fix. -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 19:43:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E17106564A; Sun, 2 Aug 2009 19:43:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCACC8FC15; Sun, 2 Aug 2009 19:43:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72JhWoA023116; Sun, 2 Aug 2009 19:43:32 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72JhWKX023102; Sun, 2 Aug 2009 19:43:32 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908021943.n72JhWKX023102@svn.freebsd.org> From: Robert Watson Date: Sun, 2 Aug 2009 19:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 19:43:33 -0000 Author: rwatson Date: Sun Aug 2 19:43:32 2009 New Revision: 196039 URL: http://svn.freebsd.org/changeset/base/196039 Log: Many network stack subsystems use a single global data structure to hold all pertinent statatistics for the subsystem. These structures are sometimes "borrowed" by kernel modules that require a place to store statistics for similar events. Add KPI accessor functions for statistics structures referenced by kernel modules so that they no longer encode certain specifics of how the data structures are named and stored. This change is intended to make it easier to move to per-CPU network stats following 8.0-RELEASE. The following modules are affected by this change: if_bridge if_cxgb if_gif ip_mroute ipdivert pf In practice, most of these statistics consumers should, in fact, maintain their own statistics data structures rather than borrowing structures from the base network stack. However, that change is too agressive for this point in the release cycle. Reviewed by: bz Approved by: re (kib) Modified: head/sys/contrib/pf/net/pf.c head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/net/if_bridge.c head/sys/netinet/icmp6.h head/sys/netinet/icmp_var.h head/sys/netinet/in_gif.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/icmp6.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/contrib/pf/net/pf.c Sun Aug 2 19:43:32 2009 (r196039) @@ -6141,7 +6141,7 @@ pf_route(struct mbuf **m, struct pf_rule if (r->rt == PF_FASTROUTE) { in_rtalloc(ro, 0); if (ro->ro_rt == 0) { - IPSTAT_INC(ips_noroute); + KMOD_IPSTAT_INC(ips_noroute); goto bad; } @@ -6272,16 +6272,16 @@ pf_route(struct mbuf **m, struct pf_rule if ((ifp->if_capabilities & IFCAP_CSUM_IPv4) && ifp->if_bridge == NULL) { m0->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT; - IPSTAT_INC(ips_outhwcsum); + KMOD_IPSTAT_INC(ips_outhwcsum); } else { ip->ip_sum = 0; ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); } /* Update relevant hardware checksum stats for TCP/UDP */ if (m0->m_pkthdr.csum_flags & M_TCPV4_CSUM_OUT) - TCPSTAT_INC(tcpstat.tcps_outhwcsum); + KMOD_TCPSTAT_INC(tcps_outhwcsum); else if (m0->m_pkthdr.csum_flags & M_UDPV4_CSUM_OUT) - UDPSTAT_INC(udps_outhwcsum); + KMOD_UDPSTAT_INC(udps_outhwcsum); error = (*ifp->if_output)(ifp, m0, sintosa(dst), NULL); goto done; } @@ -6291,7 +6291,7 @@ pf_route(struct mbuf **m, struct pf_rule * Must be able to put at least 8 bytes per fragment. */ if (ip->ip_off & htons(IP_DF)) { - IPSTAT_INC(ips_cantfrag); + KMOD_IPSTAT_INC(ips_cantfrag); if (r->rt != PF_DUPTO) { #ifdef __FreeBSD__ /* icmp_error() expects host byte ordering */ @@ -6348,7 +6348,7 @@ pf_route(struct mbuf **m, struct pf_rule } if (error == 0) - IPSTAT_INC(ips_fragmented); + KMOD_IPSTAT_INC(ips_fragmented); done: if (r->rt != PF_DUPTO) @@ -6622,23 +6622,23 @@ pf_check_proto_cksum(struct mbuf *m, int switch (p) { case IPPROTO_TCP: { - TCPSTAT_INC(tcps_rcvbadsum); + KMOD_TCPSTAT_INC(tcps_rcvbadsum); break; } case IPPROTO_UDP: { - UDPSTAT_INC(udps_badsum); + KMOD_UDPSTAT_INC(udps_badsum); break; } case IPPROTO_ICMP: { - ICMPSTAT_INC(icps_checksum); + KMOD_ICMPSTAT_INC(icps_checksum); break; } #ifdef INET6 case IPPROTO_ICMPV6: { - ICMP6STAT_INC(icp6s_checksum); + KMOD_ICMP6STAT_INC(icp6s_checksum); break; } #endif /* INET6 */ @@ -6725,17 +6725,17 @@ pf_check_proto_cksum(struct mbuf *m, int m->m_pkthdr.csum_flags |= flag_bad; switch (p) { case IPPROTO_TCP: - TCPSTAT_INC(tcps_rcvbadsum); + KMOD_TCPSTAT_INC(tcps_rcvbadsum); break; case IPPROTO_UDP: - UDPSTAT_INC(udps_badsum); + KMOD_UDPSTAT_INC(udps_badsum); break; case IPPROTO_ICMP: - ICMPSTAT_INC(icps_checksum); + KMOD_ICMPSTAT_INC(icps_checksum); break; #ifdef INET6 case IPPROTO_ICMPV6: - ICMP6STAT_INC(icp6s_checksum); + KMOD_ICMP6STAT_INC(icp6s_checksum); break; #endif /* INET6 */ } Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sun Aug 2 19:43:32 2009 (r196039) @@ -3821,7 +3821,7 @@ socket_act_establish(struct socket *so, #endif toep->tp_state = tp->t_state; - TCPSTAT_INC(tcps_connects); + KMOD_TCPSTAT_INC(tcps_connects); } Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/net/if_bridge.c Sun Aug 2 19:43:32 2009 (r196039) @@ -3244,12 +3244,12 @@ bridge_ip_checkbasic(struct mbuf **mp) if ((m = m_copyup(m, sizeof(struct ip), (max_linkhdr + 3) & ~3)) == NULL) { /* XXXJRT new stat, please */ - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); goto bad; } } else if (__predict_false(m->m_len < sizeof (struct ip))) { if ((m = m_pullup(m, sizeof (struct ip))) == NULL) { - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); goto bad; } } @@ -3257,17 +3257,17 @@ bridge_ip_checkbasic(struct mbuf **mp) if (ip == NULL) goto bad; if (ip->ip_v != IPVERSION) { - IPSTAT_INC(ips_badvers); + KMOD_IPSTAT_INC(ips_badvers); goto bad; } hlen = ip->ip_hl << 2; if (hlen < sizeof(struct ip)) { /* minimum header length */ - IPSTAT_INC(ips_badhlen); + KMOD_IPSTAT_INC(ips_badhlen); goto bad; } if (hlen > m->m_len) { if ((m = m_pullup(m, hlen)) == 0) { - IPSTAT_INC(ips_badhlen); + KMOD_IPSTAT_INC(ips_badhlen); goto bad; } ip = mtod(m, struct ip *); @@ -3284,7 +3284,7 @@ bridge_ip_checkbasic(struct mbuf **mp) } } if (sum) { - IPSTAT_INC(ips_badsum); + KMOD_IPSTAT_INC(ips_badsum); goto bad; } @@ -3295,7 +3295,7 @@ bridge_ip_checkbasic(struct mbuf **mp) * Check for additional length bogosity */ if (len < hlen) { - IPSTAT_INC(ips_badlen); + KMOD_IPSTAT_INC(ips_badlen); goto bad; } @@ -3305,7 +3305,7 @@ bridge_ip_checkbasic(struct mbuf **mp) * Drop packet if shorter than we expect. */ if (m->m_pkthdr.len < len) { - IPSTAT_INC(ips_tooshort); + KMOD_IPSTAT_INC(ips_tooshort); goto bad; } @@ -3418,7 +3418,7 @@ bridge_fragment(struct ifnet *ifp, struc } if (error == 0) - IPSTAT_INC(ips_fragmented); + KMOD_IPSTAT_INC(ips_fragmented); return (error); Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/icmp6.h Sun Aug 2 19:43:32 2009 (r196039) @@ -600,8 +600,19 @@ struct icmp6stat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define ICMP6STAT_ADD(name, val) V_icmp6stat.name += (val) #define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmp6stat_inc(int statnum); +#define KMOD_ICMP6STAT_INC(name) \ + kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t)) #endif /* Modified: head/sys/netinet/icmp_var.h ============================================================================== --- head/sys/netinet/icmp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/icmp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -58,8 +58,19 @@ struct icmpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define ICMPSTAT_ADD(name, val) V_icmpstat.name += (val) #define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmpstat_inc(int statnum); +#define KMOD_ICMPSTAT_INC(name) \ + kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/in_gif.c Sun Aug 2 19:43:32 2009 (r196039) @@ -281,14 +281,14 @@ in_gif_input(struct mbuf *m, int off) sc = (struct gif_softc *)encap_getarg(m); if (sc == NULL) { m_freem(m); - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); return; } gifp = GIF2IFP(sc); if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) { m_freem(m); - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); return; } @@ -348,7 +348,7 @@ in_gif_input(struct mbuf *m, int off) break; default: - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); m_freem(m); return; } Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_divert.c Sun Aug 2 19:43:32 2009 (r196039) @@ -186,7 +186,7 @@ void div_input(struct mbuf *m, int off) { - IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_INC(ips_noproto); m_freem(m); } @@ -310,8 +310,8 @@ divert_packet(struct mbuf *m, int incomi INP_INFO_RUNLOCK(&V_divcbinfo); if (sa == NULL) { m_freem(m); - IPSTAT_INC(ips_noproto); - IPSTAT_DEC(ips_delivered); + KMOD_IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_DEC(ips_delivered); } } @@ -396,7 +396,7 @@ div_output(struct socket *so, struct mbu ip->ip_off = ntohs(ip->ip_off); /* Send packet to output processing */ - IPSTAT_INC(ips_rawout); /* XXX */ + KMOD_IPSTAT_INC(ips_rawout); /* XXX */ #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -567,7 +567,7 @@ div_send(struct socket *so, int flags, s /* Packet must have a header (but that's about it) */ if (m->m_len < sizeof (struct ip) && (m = m_pullup(m, sizeof (struct ip))) == 0) { - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); m_freem(m); return EINVAL; } Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_icmp.c Sun Aug 2 19:43:32 2009 (r196039) @@ -172,6 +172,20 @@ icmp_init(void) } /* + * Kernel module interface for updating icmpstat. The argument is an index + * into icmpstat treated as an array of u_long. While this encodes the + * general layout of icmpstat into the caller, it doesn't encode its + * location, so that future changes to add, for example, per-CPU stats + * support won't cause binary compatibility problems for kernel modules. + */ +void +kmod_icmpstat_inc(int statnum) +{ + + (*((u_long *)&V_icmpstat + statnum))++; +} + +/* * Generate an error packet of type error * in response to bad packet ip. */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_input.c Sun Aug 2 19:43:32 2009 (r196039) @@ -235,6 +235,27 @@ VNET_DEFINE(int, fw_one_pass) = 1; static void ip_freef(struct ipqhead *, struct ipq *); +/* + * Kernel module interface for updating ipstat. The argument is an index + * into ipstat treated as an array of u_long. While this encodes the general + * layout of ipstat into the caller, it doesn't encode its location, so that + * future changes to add, for example, per-CPU stats support won't cause + * binary compatibility problems for kernel modules. + */ +void +kmod_ipstat_inc(int statnum) +{ + + (*((u_long *)&V_ipstat + statnum))++; +} + +void +kmod_ipstat_dec(int statnum) +{ + + (*((u_long *)&V_ipstat + statnum))--; +} + static int sysctl_netinet_intr_queue_maxlen(SYSCTL_HANDLER_ARGS) { Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -131,11 +131,25 @@ struct ipstat { #include +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define IPSTAT_ADD(name, val) V_ipstat.name += (val) #define IPSTAT_SUB(name, val) V_ipstat.name -= (val) #define IPSTAT_INC(name) IPSTAT_ADD(name, 1) #define IPSTAT_DEC(name) IPSTAT_SUB(name, 1) +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_ipstat_inc(int statnum); +#define KMOD_IPSTAT_INC(name) \ + kmod_ipstat_inc(offsetof(struct ipstat, name) / sizeof(u_long)) +void kmod_ipstat_dec(int statnum); +#define KMOD_IPSTAT_DEC(name) \ + kmod_ipstat_dec(offsetof(struct ipstat, name) / sizeof(u_long)) + /* flags passed to ip_output as last parameter */ #define IP_FORWARDING 0x1 /* most of ip header exists */ #define IP_RAWOUTPUT 0x2 /* raw ip header exists */ Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/tcp_input.c Sun Aug 2 19:43:32 2009 (r196039) @@ -217,6 +217,20 @@ static void tcp_newreno_partial_ack(str static void inline tcp_congestion_exp(struct tcpcb *); +/* + * Kernel module interface for updating tcpstat. The argument is an index + * into tcpstat treated as an array of u_long. While this encodes the + * general layout of tcpstat into the caller, it doesn't encode its location, + * so that future changes to add, for example, per-CPU stats support won't + * cause binary compatibility problems for kernel modules. + */ +void +kmod_tcpstat_inc(int statnum) +{ + + (*((u_long *)&V_tcpstat + statnum))++; +} + static void inline tcp_congestion_exp(struct tcpcb *tp) { Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/tcp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -474,8 +474,19 @@ struct tcpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define TCPSTAT_ADD(name, val) V_tcpstat.name += (val) #define TCPSTAT_INC(name) TCPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_tcpstat_inc(int statnum); +#define KMOD_TCPSTAT_INC(name) \ + kmod_tcpstat_inc(offsetof(struct tcpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/udp_usrreq.c Sun Aug 2 19:43:32 2009 (r196039) @@ -203,6 +203,20 @@ udp_init(void) EVENTHANDLER_PRI_ANY); } +/* + * Kernel module interface for updating udpstat. The argument is an index + * into udpstat treated as an array of u_long. While this encodes the + * general layout of udpstat into the caller, it doesn't encode its location, + * so that future changes to add, for example, per-CPU stats support won't + * cause binary compatibility problems for kernel modules. + */ +void +kmod_udpstat_inc(int statnum) +{ + + (*((u_long *)&V_udpstat + statnum))++; +} + int udp_newudpcb(struct inpcb *inp) { Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/udp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -91,8 +91,19 @@ struct udpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define UDPSTAT_ADD(name, val) V_udpstat.name += (val) #define UDPSTAT_INC(name) UDPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_udpstat_inc(int statnum); +#define KMOD_UDPSTAT_INC(name) \ + kmod_udpstat_inc(offsetof(struct udpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet6/icmp6.c Sun Aug 2 19:43:32 2009 (r196039) @@ -152,6 +152,20 @@ icmp6_init(void) V_icmp6errpps_count = 0; } +/* + * Kernel module interface for updating icmp6stat. The argument is an index + * into icmp6stat treated as an array of u_quad_t. While this encodes the + * general layout of icmp6stat into the caller, it doesn't encode its + * location, so that future changes to add, for example, per-CPU stats + * support won't cause binary compatibility problems for kernel modules. + */ +void +kmod_icmp6stat_inc(int statnum) +{ + + (*((u_quad_t *)&V_icmp6stat + statnum))++; +} + static void icmp6_errcount(struct icmp6errstat *stat, int type, int code) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 19:58:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8E39106566B; Sun, 2 Aug 2009 19:58:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id ABB0A8FC0C; Sun, 2 Aug 2009 19:58:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from [192.168.2.101] (host81-155-13-237.range81-155.btcentralplus.com [81.155.13.237]) by cyrus.watson.org (Postfix) with ESMTPSA id 89F4D46B2E; Sun, 2 Aug 2009 15:58:15 -0400 (EDT) Message-Id: <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> From: "Robert N. M. Watson" To: Alfred Perlstein In-Reply-To: <20090802192902.GS47463@elvis.mu.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 2 Aug 2009 20:58:14 +0100 References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> <20090802192902.GS47463@elvis.mu.org> X-Mailer: Apple Mail (2.935.3) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Navdeep Parhar , Hans Petter Selasky Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 19:58:17 -0000 On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: > * Robert Watson [090801 15:15] wrote: >> >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: >> >>>>> This has slowed down core dumps very significantly. What used >>>>> to take >>>>> 10-15s on my system now takes around 3 minutes. A simple test >>>>> is to >>>>> break into ddb and "call doadump" with or without this rev. I >>>>> have a >>>>> serial console on this machine and so I can use ddb whether the >>>>> attached >>>>> USB keyboard works or not. >>> >>> It's because there is a DELAY(1000) in the UKBD's polling routine >>> so that >>> key- repeating will work, no magic. >> >> Given a choice between dumping 10x faster and having automatic key >> repeat >> in DDB, I'd lean towards the former. :-) >> > > Robert, and *@freebsd.org, > > Hans should be back in a day or so to address this. If critical I can > probably back out the offending code, but I think it makes sense to > wait a few days more for a more comprehensive fix. That's my feeling too -- however, I think it would be useful to generate a small concept test patch that disables the key repeat behavior and see if it restores some/all performance. Scott's argument suggests only some, but perhaps we'd get quite a bit, which is what we're looking for. We wouldn't commit the patch but it would let us know we're on the right track. Robert From owner-svn-src-all@FreeBSD.ORG Sun Aug 2 22:47:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8423B106566B; Sun, 2 Aug 2009 22:47:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 722248FC0A; Sun, 2 Aug 2009 22:47:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n72Ml8Yu026828; Sun, 2 Aug 2009 22:47:08 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n72Ml8n9026826; Sun, 2 Aug 2009 22:47:08 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908022247.n72Ml8n9026826@svn.freebsd.org> From: Robert Watson Date: Sun, 2 Aug 2009 22:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196041 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 22:47:08 -0000 Author: rwatson Date: Sun Aug 2 22:47:08 2009 New Revision: 196041 URL: http://svn.freebsd.org/changeset/base/196041 Log: Add padding to struct inpcb, missed during our padding sweep earlier in the release cycle. Approved by: re (kensmith) Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun Aug 2 21:16:01 2009 (r196040) +++ head/sys/netinet/in_pcb.h Sun Aug 2 22:47:08 2009 (r196041) @@ -169,7 +169,8 @@ struct inpcb { u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ - void *inp_pspare[2]; /* (x) rtentry / general use */ + void *inp_pspare[4]; /* (x) rtentry / general use */ + u_int inp_ispare[4]; /* general use */ /* Local and foreign ports, local and foreign addr. */ struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 07:23:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEF8D106566B; Mon, 3 Aug 2009 07:23:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 8AAF38FC0A; Mon, 3 Aug 2009 07:23:14 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Ng6CjssoZK4A:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=tvxVFqbIViT3gDeE9WcA:9 a=2d7sk_lQ3xpT-xgUtR8A:7 a=cetWsfPpLUD0WGh-NiOkqoOadlQA:4 a=Rk7U24iObsvedVEAsQEA:9 a=gnrMiKeQK1jmmxtyE0cA:7 a=AN3LayuI9UxRzUdBw6P6GySq-W0A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 234667817; Mon, 03 Aug 2009 09:23:13 +0200 To: "Robert N. M. Watson" Content-Disposition: inline From: Hans Petter Selasky Date: Mon, 3 Aug 2009 09:23:10 +0200 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_gBpdKXvHCK5Yo+y" Message-Id: <200908030923.12867.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org, Navdeep Parhar Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 07:23:16 -0000 --Boundary-00=_gBpdKXvHCK5Yo+y Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Here is a patch to address the problem. Please test and report back. Works fine over here. http://perforce.freebsd.org/chv.cgi?CH=166957 MD5 (ukbd.c.diff) = 1e3c143942593b0ed4617d306a9d2ee2 cd /usr/src/sys/dev/usb/input/ cat ukbd.c.diff | patch --HPS --Boundary-00=_gBpdKXvHCK5Yo+y Content-Type: text/x-patch; charset="iso-8859-1"; name="ukbd.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ukbd.c.diff" --- ukbd.c 2009-08-02 16:28:40.000000000 +0200 +++ ukbd.c 2009-08-03 09:12:42.000000000 +0200 @@ -170,6 +170,7 @@ int32_t sc_state; /* shift/lock key state */ int32_t sc_accents; /* accent key index (> 0) */ + uint16_t sc_microtime; /* used when polling */ uint16_t sc_inputs; uint16_t sc_inputhead; uint16_t sc_inputtail; @@ -302,18 +303,32 @@ static void ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait) { + struct timeval tv; + uint16_t temp; + DPRINTFN(2, "polling\n"); while (sc->sc_inputs == 0) { usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER); - DELAY(1000); /* delay 1 ms */ + microtime(&tv); - sc->sc_time_ms++; + temp = tv.tv_usec / 25000; /* support repetition of keys: */ + if (sc->sc_microtime != temp) { + + /* wait for next delta */ + + sc->sc_microtime = temp; + + /* 25 milliseconds have passed */ + + sc->sc_time_ms += 25; + } + ukbd_interrupt(sc); if (!wait) --Boundary-00=_gBpdKXvHCK5Yo+y-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 07:24:52 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ECB11065676; Mon, 3 Aug 2009 07:24:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7438FC12; Mon, 3 Aug 2009 07:24:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n737LGSt017734; Mon, 3 Aug 2009 01:21:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 03 Aug 2009 01:22:06 -0600 (MDT) Message-Id: <20090803.012206.1492586399.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200908030827.21108.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> <200908030827.21108.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, rwatson@FreeBSD.org, nparhar@gmail.com, svn-src-head@FreeBSD.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 07:24:52 -0000 In message: <200908030827.21108.hselasky@c2i.net> Hans Petter Selasky writes: : On Sunday 02 August 2009 21:58:14 Robert N. M. Watson wrote: : > On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: : > > * Robert Watson [090801 15:15] wrote: : > >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: : > >>>>> This has slowed down core dumps very significantly. What used : > >>>>> to take : > >>>>> 10-15s on my system now takes around 3 minutes. A simple test : > >>>>> is to : > >>>>> break into ddb and "call doadump" with or without this rev. I : > >>>>> have a : > >>>>> serial console on this machine and so I can use ddb whether the : > >>>>> attached : > >>>>> USB keyboard works or not. : > >>> : > >>> It's because there is a DELAY(1000) in the UKBD's polling routine : > >>> so that : > >>> key- repeating will work, no magic. : > >> : > >> Given a choice between dumping 10x faster and having automatic key : > >> repeat : > >> in DDB, I'd lean towards the former. :-) : > > : > > Robert, and *@freebsd.org, : > > : > > Hans should be back in a day or so to address this. If critical I can : > > probably back out the offending code, but I think it makes sense to : > > wait a few days more for a more comprehensive fix. : > : > That's my feeling too -- however, I think it would be useful to : > generate a small concept test patch that disables the key repeat : > behavior and see if it restores some/all performance. Scott's argument : > suggests only some, but perhaps we'd get quite a bit, which is what : > we're looking for. We wouldn't commit the patch but it would let us : > know we're on the right track. : : Hi, : : I'm back. : : I see two solutions: : : 1) Disable the timekeeping if no keys are pressed. : : 2) Second option is to use getmicrotime. Actually what I need is just a : millisecond time reference so I know when to repeat the last key. : : Any opinions? DELAY() or getmicrotime() ? I'd note the state at each poll, and if > 1ms has passed since the down event, I'd repeat. I wouldn't use DELAY at all to see if you needed to repeat: I'd let the clocking of the polling drive you here (eg, you know that someone else will call it a lot, so leverage that to avoid the delay). Warner From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 07:27:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 046711065675; Mon, 3 Aug 2009 07:27:28 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 36C0A8FC08; Mon, 3 Aug 2009 07:27:27 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GB8WYDQo1twA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=evCO53Li0c532tvo64wA:9 a=n0dlPTy1Bsx6D5iOPzfKwzgKjrgA:4 a=SV7veod9ZcQA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1297384967; Mon, 03 Aug 2009 08:27:23 +0200 From: Hans Petter Selasky To: "Robert N. M. Watson" Date: Mon, 3 Aug 2009 08:27:19 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> In-Reply-To: <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908030827.21108.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org, Navdeep Parhar Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 07:27:28 -0000 On Sunday 02 August 2009 21:58:14 Robert N. M. Watson wrote: > On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: > > * Robert Watson [090801 15:15] wrote: > >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: > >>>>> This has slowed down core dumps very significantly. What used > >>>>> to take > >>>>> 10-15s on my system now takes around 3 minutes. A simple test > >>>>> is to > >>>>> break into ddb and "call doadump" with or without this rev. I > >>>>> have a > >>>>> serial console on this machine and so I can use ddb whether the > >>>>> attached > >>>>> USB keyboard works or not. > >>> > >>> It's because there is a DELAY(1000) in the UKBD's polling routine > >>> so that > >>> key- repeating will work, no magic. > >> > >> Given a choice between dumping 10x faster and having automatic key > >> repeat > >> in DDB, I'd lean towards the former. :-) > > > > Robert, and *@freebsd.org, > > > > Hans should be back in a day or so to address this. If critical I can > > probably back out the offending code, but I think it makes sense to > > wait a few days more for a more comprehensive fix. > > That's my feeling too -- however, I think it would be useful to > generate a small concept test patch that disables the key repeat > behavior and see if it restores some/all performance. Scott's argument > suggests only some, but perhaps we'd get quite a bit, which is what > we're looking for. We wouldn't commit the patch but it would let us > know we're on the right track. Hi, I'm back. I see two solutions: 1) Disable the timekeeping if no keys are pressed. 2) Second option is to use getmicrotime. Actually what I need is just a millisecond time reference so I know when to repeat the last key. Any opinions? DELAY() or getmicrotime() ? --HPS From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:12:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703361065672; Mon, 3 Aug 2009 08:12:04 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43EAA8FC13; Mon, 3 Aug 2009 08:12:04 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n738C47t040643; Mon, 3 Aug 2009 08:12:04 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n738C4se040641; Mon, 3 Aug 2009 08:12:04 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908030812.n738C4se040641@svn.freebsd.org> From: Ken Smith Date: Mon, 3 Aug 2009 08:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196044 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:12:04 -0000 Author: kensmith Date: Mon Aug 3 08:12:03 2009 New Revision: 196044 URL: http://svn.freebsd.org/changeset/base/196044 Log: Add stable/8 to paths. Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Mon Aug 3 05:47:58 2009 (r196043) +++ svnadmin/conf/paths Mon Aug 3 08:12:03 2009 (r196044) @@ -15,6 +15,7 @@ ^stable/5/ ^stable/6/ ^stable/7/ +^stable/8/ # Feature branches. Not open until we're certain we're not reverting to cvs. ^user/ From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:13:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01FDB1065670; Mon, 3 Aug 2009 08:13:07 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7BB8FC1E; Mon, 3 Aug 2009 08:13:06 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n738D62C040725; Mon, 3 Aug 2009 08:13:06 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n738D6x1040724; Mon, 3 Aug 2009 08:13:06 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908030813.n738D6x1040724@svn.freebsd.org> From: Ken Smith Date: Mon, 3 Aug 2009 08:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org X-SVN-Group: defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:13:07 -0000 Author: kensmith Date: Mon Aug 3 08:13:06 2009 New Revision: 196045 URL: http://svn.freebsd.org/changeset/base/196045 Log: Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit) Added: stable/8/ (props changed) - copied from r196044, head/ From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:14:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D08E106566C; Mon, 3 Aug 2009 08:14:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 567758FC21; Mon, 3 Aug 2009 08:14:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 905BE46B32; Mon, 3 Aug 2009 04:14:37 -0400 (EDT) Date: Mon, 3 Aug 2009 09:14:37 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200908030923.12867.hselasky@c2i.net> Message-ID: References: <200908030923.12867.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org, Navdeep Parhar Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:14:39 -0000 On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > Here is a patch to address the problem. Please test and report back. Works > fine over here. > > http://perforce.freebsd.org/chv.cgi?CH=166957 > > MD5 (ukbd.c.diff) = 1e3c143942593b0ed4617d306a9d2ee2 > > cd /usr/src/sys/dev/usb/input/ > cat ukbd.c.diff | patch I'm a bit surprised the timed key repeat in this patch would work properly in DDB, as microtime(9) relies on interrupts firing for updated timestamps. The availability of interrupts for polled input consumers varies, but in general this is not true (for example) at the DDB command prompt. Does this code work correctly when time stands still? Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:15:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555BD1065674; Mon, 3 Aug 2009 08:15:07 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4358C8FC0C; Mon, 3 Aug 2009 08:15:07 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n738F7Va040845; Mon, 3 Aug 2009 08:15:07 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n738F7xA040843; Mon, 3 Aug 2009 08:15:07 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908030815.n738F7xA040843@svn.freebsd.org> From: Ken Smith Date: Mon, 3 Aug 2009 08:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196046 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:15:08 -0000 Author: kensmith Date: Mon Aug 3 08:15:06 2009 New Revision: 196046 URL: http://svn.freebsd.org/changeset/base/196046 Log: Turn on approval for stable/8. Approved by: re (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon Aug 3 08:13:06 2009 (r196045) +++ svnadmin/conf/approvers Mon Aug 3 08:15:06 2009 (r196046) @@ -17,8 +17,8 @@ # $FreeBSD$ # ^head/ re +^stable/8/ re #^stable/7/ re -#^stable/6/ re ^releng/7.[0-2]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:28:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5D610656D9; Mon, 3 Aug 2009 08:28:39 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 4D15C8FC1F; Mon, 3 Aug 2009 08:28:39 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 65D561CC28; Mon, 3 Aug 2009 10:28:38 +0200 (CEST) Date: Mon, 3 Aug 2009 10:28:38 +0200 From: Ed Schouten To: Robert Watson Message-ID: <20090803082838.GE1292@hoeg.nl> References: <200908030923.12867.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="g5OIygP5QP1fC/+Y" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Hans Petter Selasky , Navdeep Parhar , svn-src-head@freebsd.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:28:40 -0000 --g5OIygP5QP1fC/+Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Watson wrote: > I'm a bit surprised the timed key repeat in this patch would work > properly in DDB, as microtime(9) relies on interrupts firing for > updated timestamps. The availability of interrupts for polled input > consumers varies, but in general this is not true (for example) at > the DDB command prompt. Does this code work correctly when time > stands still? Apart from that, who gives a *beep* about keyboard repeat while inside the debugger. I have to confess it would be irritating to press backspace multiple times, instead of holding the key pressed, but still, it's not worth it. --=20 Ed Schouten WWW: http://80386.nl/ --g5OIygP5QP1fC/+Y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkp2n7YACgkQ52SDGA2eCwXMywCeOoUR0tdn8EaMudQ2gapVvF8c CywAn37nMSOfYP1RbJukgt/eDKgAX2rg =+dY+ -----END PGP SIGNATURE----- --g5OIygP5QP1fC/+Y-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 08:29:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79FCC106564A; Mon, 3 Aug 2009 08:29:35 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 421048FC1D; Mon, 3 Aug 2009 08:29:35 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B44921CC28; Mon, 3 Aug 2009 10:29:34 +0200 (CEST) Date: Mon, 3 Aug 2009 10:29:34 +0200 From: Ed Schouten To: Ken Smith Message-ID: <20090803082934.GF1292@hoeg.nl> References: <200908030813.n738D6x1040724@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WI+ghjzd0JGVd6h/" Content-Disposition: inline In-Reply-To: <200908030813.n738D6x1040724@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 08:29:35 -0000 --WI+ghjzd0JGVd6h/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ken Smith wrote: > Copy head to stable/8 as part of 8.0 Release cycle. I, for one, welcome our RELENG_8 overlords! --=20 Ed Schouten WWW: http://80386.nl/ --WI+ghjzd0JGVd6h/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkp2n+4ACgkQ52SDGA2eCwXukACfW3UGdKsWwoYO7+Pt4/2DhS6x 8UQAn3Ko4T61NYrq27MC7DWkyQ0VKFqk =CVsw -----END PGP SIGNATURE----- --WI+ghjzd0JGVd6h/-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:42:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA12F106568C; Mon, 3 Aug 2009 09:42:11 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D766B8FC0A; Mon, 3 Aug 2009 09:42:11 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n739gBtb043386; Mon, 3 Aug 2009 09:42:11 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n739gBuI043385; Mon, 3 Aug 2009 09:42:11 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200908030942.n739gBuI043385@svn.freebsd.org> From: Ken Smith Date: Mon, 3 Aug 2009 09:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196047 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:42:12 -0000 Author: kensmith Date: Mon Aug 3 09:42:11 2009 New Revision: 196047 URL: http://svn.freebsd.org/changeset/base/196047 Log: Note when RELENG_8 branch was created. Approved by: re (implicit) Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Mon Aug 3 08:15:06 2009 (r196046) +++ stable/8/UPDATING Mon Aug 3 09:42:11 2009 (r196047) @@ -22,6 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090803: + RELENG_8 branched. + 20090719: Bump the shared library version numbers for all libraries that do not use symbol versioning as part of the 8.0-RELEASE cycle. From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:43:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B81D31065672; Mon, 3 Aug 2009 09:43:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A54EB8FC24; Mon, 3 Aug 2009 09:43:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n739h669043441; Mon, 3 Aug 2009 09:43:06 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n739h6cF043439; Mon, 3 Aug 2009 09:43:06 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200908030943.n739h6cF043439@svn.freebsd.org> From: Brian Somers Date: Mon, 3 Aug 2009 09:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196048 - stable/7/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:43:07 -0000 Author: brian Date: Mon Aug 3 09:43:06 2009 New Revision: 196048 URL: http://svn.freebsd.org/changeset/base/196048 Log: MFC: Add a missing phrase. Submitted by: Jason McIntyre jmc at kerhand dot co dot uk Obtained from: OpenBSD Modified: stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/ppp/ppp.8.m4 Modified: stable/7/usr.sbin/ppp/ppp.8.m4 ============================================================================== --- stable/7/usr.sbin/ppp/ppp.8.m4 Mon Aug 3 09:42:11 2009 (r196047) +++ stable/7/usr.sbin/ppp/ppp.8.m4 Mon Aug 3 09:43:06 2009 (r196048) @@ -5471,7 +5471,7 @@ keywords. .It RAD_FRAMED_IPV6_PREFIX If this attribute is supplied, the value is substituted for IPV6PREFIX in a command. -You may pass it to such as DHCPv6 for delegating an +You may pass it to an upper layer protocol such as DHCPv6 for delegating an IPv6 prefix to a peer. .It RAD_FRAMED_IPV6_ROUTE The received string is expected to be in the format From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:44:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6DE1065674; Mon, 3 Aug 2009 09:44:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1AE8FC1B; Mon, 3 Aug 2009 09:44:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Ng6CjssoZK4A:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=oTNKfSD0sQXMHyas5vEA:9 a=aG2-WZzWzLapXByvOn97HSyIWogA:4 a=SV7veod9ZcQA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1297475629; Mon, 03 Aug 2009 11:29:08 +0200 From: Hans Petter Selasky To: Ed Schouten Date: Mon, 3 Aug 2009 11:29:04 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> In-Reply-To: <20090803082838.GE1292@hoeg.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908031129.06315.hselasky@c2i.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Robert Watson , Navdeep Parhar , svn-src-head@freebsd.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:44:12 -0000 On Monday 03 August 2009 10:28:38 Ed Schouten wrote: > * Robert Watson wrote: > > I'm a bit surprised the timed key repeat in this patch would work > > properly in DDB, as microtime(9) relies on interrupts firing for > > updated timestamps. The availability of interrupts for polled input > > consumers varies, but in general this is not true (for example) at > > the DDB command prompt. Does this code work correctly when time > > stands still? > > Apart from that, who gives a *beep* about keyboard repeat while inside > the debugger. I have to confess it would be irritating to press > backspace multiple times, instead of holding the key pressed, but still, > it's not worth it. I think getmicrotime relies on interrupts, while microtime doesn't. See "man microtime". --HPS From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:55:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EAB10656AD; Mon, 3 Aug 2009 09:55:04 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14A3F8FC1B; Mon, 3 Aug 2009 09:55:04 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n739t34C043976; Mon, 3 Aug 2009 09:55:03 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n739t3k5043973; Mon, 3 Aug 2009 09:55:03 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200908030955.n739t3k5043973@svn.freebsd.org> From: Brian Somers Date: Mon, 3 Aug 2009 09:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196049 - in stable/7: tools/regression/usr.bin/jot usr.bin/jot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:55:05 -0000 Author: brian Date: Mon Aug 3 09:55:03 2009 New Revision: 196049 URL: http://svn.freebsd.org/changeset/base/196049 Log: MFC: Fix some uninitialised variables. PR: 136383 Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net Added: stable/7/tools/regression/usr.bin/jot/regress.dddd.out - copied unchanged from r195443, head/tools/regression/usr.bin/jot/regress.dddd.out Modified: stable/7/tools/regression/usr.bin/jot/ (props changed) stable/7/tools/regression/usr.bin/jot/regress.sh stable/7/usr.bin/jot/ (props changed) stable/7/usr.bin/jot/jot.c Copied: stable/7/tools/regression/usr.bin/jot/regress.dddd.out (from r195443, head/tools/regression/usr.bin/jot/regress.dddd.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/usr.bin/jot/regress.dddd.out Mon Aug 3 09:55:03 2009 (r196049, copy of r195443, head/tools/regression/usr.bin/jot/regress.dddd.out) @@ -0,0 +1,100 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 Modified: stable/7/tools/regression/usr.bin/jot/regress.sh ============================================================================== --- stable/7/tools/regression/usr.bin/jot/regress.sh Mon Aug 3 09:43:06 2009 (r196048) +++ stable/7/tools/regression/usr.bin/jot/regress.sh Mon Aug 3 09:55:03 2009 (r196049) @@ -1,6 +1,6 @@ # $FreeBSD$ -echo 1..56 +echo 1..57 REGRESSION_START($1) @@ -20,6 +20,7 @@ REGRESSION_TEST(`dhdd', `jot - 20 - -') REGRESSION_TEST(`ddhh', `jot - - 120 2') REGRESSION_TEST(`ddhd', `jot - - 120 -') REGRESSION_TEST(`dddh', `jot - - - 2') +REGRESSION_TEST(`dddd', `jot - - - -') REGRESSION_TEST(`hhhh2', `jot 30 20 160 2') REGRESSION_TEST(`hhhd2', `jot 30 20 160 -') REGRESSION_TEST(`hhdh2', `jot 30 20 - 2') Modified: stable/7/usr.bin/jot/jot.c ============================================================================== --- stable/7/usr.bin/jot/jot.c Mon Aug 3 09:43:06 2009 (r196048) +++ stable/7/usr.bin/jot/jot.c Mon Aug 3 09:55:03 2009 (r196049) @@ -101,13 +101,13 @@ main(int argc, char **argv) int ch; int mask = 0; int n = 0; - double begin; + double begin = BEGIN_DEF; double divisor; - double ender; - double s; + double ender = ENDER_DEF; + double s = STEP_DEF; double x, y; long i; - long reps; + long reps = REPS_DEF; while ((ch = getopt(argc, argv, "b:cnp:rs:w:")) != -1) switch (ch) { From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:57:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A963106566C; Mon, 3 Aug 2009 09:57:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D57C18FC14; Mon, 3 Aug 2009 09:57:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7145D46B17; Mon, 3 Aug 2009 05:57:20 -0400 (EDT) Date: Mon, 3 Aug 2009 10:57:20 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200908031129.06315.hselasky@c2i.net> Message-ID: References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> <200908031129.06315.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Navdeep Parhar , svn-src-head@freebsd.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:57:21 -0000 On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 10:28:38 Ed Schouten wrote: >> * Robert Watson wrote: >>> I'm a bit surprised the timed key repeat in this patch would work properly >>> in DDB, as microtime(9) relies on interrupts firing for updated >>> timestamps. The availability of interrupts for polled input consumers >>> varies, but in general this is not true (for example) at the DDB command >>> prompt. Does this code work correctly when time stands still? >> >> Apart from that, who gives a *beep* about keyboard repeat while inside the >> debugger. I have to confess it would be irritating to press backspace >> multiple times, instead of holding the key pressed, but still, it's not >> worth it. > > I think getmicrotime relies on interrupts, while microtime doesn't. > > See "man microtime". You're right, but that doesn't make things better :-). Some of the tc_get_timecount() calls are safe in the DDB environment, but several are not. In particular, tick_get_timecount_mp() and i8254_get_timecount() both acquire locks, the former the thread scheduler lock, and the latter a dedicated spinlock. This produces the opportunity for rather nasty deadlocks in DDB, especially tick_get_timecount_mp() on sparc64. This was the bug I was actually looking for in your patch, but then misread microtime() and concluded you had a different one. :-) I would much rather not have DDB rely on, for example, not contending thread_lock(), than have key repeat in DDB. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 09:58:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B23091065670; Mon, 3 Aug 2009 09:58:46 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FE178FC12; Mon, 3 Aug 2009 09:58:46 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n739wkT4044109; Mon, 3 Aug 2009 09:58:46 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n739wkWH044108; Mon, 3 Aug 2009 09:58:46 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200908030958.n739wkWH044108@svn.freebsd.org> From: Brian Somers Date: Mon, 3 Aug 2009 09:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196050 - stable/7/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 09:58:47 -0000 Author: brian Date: Mon Aug 3 09:58:46 2009 New Revision: 196050 URL: http://svn.freebsd.org/changeset/base/196050 Log: MFC: Add the -d switch to the usage message. Modified: stable/7/bin/ps/ (props changed) stable/7/bin/ps/ps.c Modified: stable/7/bin/ps/ps.c ============================================================================== --- stable/7/bin/ps/ps.c Mon Aug 3 09:55:03 2009 (r196049) +++ stable/7/bin/ps/ps.c Mon Aug 3 09:58:46 2009 (r196050) @@ -1331,7 +1331,7 @@ check_procfs(void) static void usage(void) { -#define SINGLE_OPTS "[-aCce" OPT_LAZY_f "HhjlmrSTuvwXxZ]" +#define SINGLE_OPTS "[-aCcde" OPT_LAZY_f "HhjlmrSTuvwXxZ]" (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 13:31:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6146B106566C; Mon, 3 Aug 2009 13:31:28 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E320D8FC12; Mon, 3 Aug 2009 13:31:27 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 085116D418; Mon, 3 Aug 2009 13:31:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id DC772844E4; Mon, 3 Aug 2009 15:31:25 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ken Smith References: <200908030813.n738D6x1040724@svn.freebsd.org> Date: Mon, 03 Aug 2009 15:31:25 +0200 In-Reply-To: <200908030813.n738D6x1040724@svn.freebsd.org> (Ken Smith's message of "Mon, 3 Aug 2009 08:13:06 +0000 (UTC)") Message-ID: <86hbwpvxaq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 13:31:28 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ken Smith writes: > Author: kensmith > Date: Mon Aug 3 08:13:06 2009 > New Revision: 196045 > URL: http://svn.freebsd.org/changeset/base/196045 > > Log: > Copy head to stable/8 as part of 8.0 Release cycle. >=20=20=20 > Approved by: re (Implicit) > > Added: > stable/8/ (props changed) > - copied from r196044, head/ This should have been tagged with X-SVN-Group: stable-8, but it wasn't, because a) someone forgot to add stable-8 to svnadmin/conf/mailer.conf and b) a stable-8 entry patterned on the existing stable-7 entry wouldn't have worked anyway, because the regexp requires a slash (i.e. stable/8/). Patch attached. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fsvn-mailer-conf.diff Index: svnadmin/conf/mailer.conf =================================================================== --- svnadmin/conf/mailer.conf (revision 196050) +++ svnadmin/conf/mailer.conf (working copy) @@ -335,54 +335,58 @@ # [svnadmin] -for_paths = svnadmin/.* +for_paths = ^svnadmin(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-svnadmin@freebsd.org [head] -for_paths = head/.* +for_paths = ^head(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-head@freebsd.org +[stable-8] +for_paths = ^stable/8(/[^/]+)*$ +to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-7@freebsd.org + [stable-7] -for_paths = stable/7/.* +for_paths = ^stable/7(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-7@freebsd.org [stable-6] -for_paths = stable/6/.* +for_paths = ^stable/6(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-6@freebsd.org [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^67](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org [projects] -for_paths = projects/.* +for_paths = ^projects(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-projects@freebsd.org [user] -for_paths = user/.* +for_paths = ^user(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-user@freebsd.org [release] -for_paths = release/.* +for_paths = ^release(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-release@freebsd.org [releng] -for_paths = releng.* +for_paths = ^releng(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-releng@freebsd.org [vendor] -for_paths = vendor.* +for_paths = ^vendor(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-cddl] -for_paths = vendor-cddl/.* +for_paths = ^vendor-cddl(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-crypto] -for_paths = vendor-crypto/.* +for_paths = ^vendor-crypto(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-sys] -for_paths = vendor-sys/.* +for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org --=-=-=-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 13:59:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805971065679; Mon, 3 Aug 2009 13:59:14 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 451C38FC08; Mon, 3 Aug 2009 13:59:14 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:856e:4020:7f34:2920] (unknown [IPv6:2001:7b8:3a7:0:856e:4020:7f34:2920]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 77F675C59; Mon, 3 Aug 2009 15:59:12 +0200 (CEST) Message-ID: <4A76ED32.80304@andric.com> Date: Mon, 03 Aug 2009 15:59:14 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3pre) Gecko/20090801 Shredder/3.0b4pre MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> In-Reply-To: <86hbwpvxaq.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 13:59:14 -0000 On 2009-08-03 15:31, Dag-Erling Sm=C3=B8rgrav wrote: > This should have been tagged with X-SVN-Group: stable-8, but it wasn't,= > because a) someone forgot to add stable-8 to svnadmin/conf/mailer.conf > and b) a stable-8 entry patterned on the existing stable-7 entry > wouldn't have worked anyway, because the regexp requires a slash (i.e. > stable/8/). Patch attached. You might want to change: [stable-other] -for_paths =3D stable/[^67]/.* +for_paths =3D ^stable/[^67](/[^/]+)*$ to_addr =3D src-committers@freebsd.org svn-src-all@freebsd.org svn-src-s= table@freebsd.org svn-src-stable-other@freebsd.org =20 into: [stable-other] -for_paths =3D stable/[^67]/.* +for_paths =3D ^stable/[^678](/[^/]+)*$ to_addr =3D src-committers@freebsd.org svn-src-all@freebsd.org svn-src-s= table@freebsd.org svn-src-stable-other@freebsd.org while you're at it. :) From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 14:05:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D8091065672; Mon, 3 Aug 2009 14:05:11 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E01AE8FC18; Mon, 3 Aug 2009 14:05:10 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EB5776D418; Mon, 3 Aug 2009 14:05:09 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id CF1D2844DC; Mon, 3 Aug 2009 16:05:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dimitry Andric References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> <4A76ED32.80304@andric.com> Date: Mon, 03 Aug 2009 16:05:09 +0200 In-Reply-To: <4A76ED32.80304@andric.com> (Dimitry Andric's message of "Mon, 03 Aug 2009 15:59:14 +0200") Message-ID: <868wi1vvqi.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 14:05:11 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dimitry Andric writes: > You might want to change [...] Thanks, new patch attached. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fsvn-mailer-conf.diff Index: svnadmin/conf/mailer.conf =================================================================== --- svnadmin/conf/mailer.conf (revision 196050) +++ svnadmin/conf/mailer.conf (working copy) @@ -335,54 +335,58 @@ # [svnadmin] -for_paths = svnadmin/.* +for_paths = ^svnadmin(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-svnadmin@freebsd.org [head] -for_paths = head/.* +for_paths = ^head(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-head@freebsd.org +[stable-8] +for_paths = ^stable/8(/[^/]+)*$ +to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-8@freebsd.org + [stable-7] -for_paths = stable/7/.* +for_paths = ^stable/7(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-7@freebsd.org [stable-6] -for_paths = stable/6/.* +for_paths = ^stable/6(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-6@freebsd.org [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^678](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org [projects] -for_paths = projects/.* +for_paths = ^projects(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-projects@freebsd.org [user] -for_paths = user/.* +for_paths = ^user(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-user@freebsd.org [release] -for_paths = release/.* +for_paths = ^release(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-release@freebsd.org [releng] -for_paths = releng.* +for_paths = ^releng(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-releng@freebsd.org [vendor] -for_paths = vendor.* +for_paths = ^vendor(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-cddl] -for_paths = vendor-cddl/.* +for_paths = ^vendor-cddl(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-crypto] -for_paths = vendor-crypto/.* +for_paths = ^vendor-crypto(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-sys] -for_paths = vendor-sys/.* +for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org --=-=-=-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 17:46:30 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8958C106570F; Mon, 3 Aug 2009 17:46:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 18E1E8FC18; Mon, 3 Aug 2009 17:46:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-212.carlnfd1.nsw.optusnet.com.au (c122-106-149-212.carlnfd1.nsw.optusnet.com.au [122.106.149.212]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n73HkGfn020042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Aug 2009 03:46:18 +1000 Date: Tue, 4 Aug 2009 03:46:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20090803.012206.1492586399.imp@bsdimp.com> Message-ID: <20090804032402.J21599@delplex.bde.org> References: <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> <200908030827.21108.hselasky@c2i.net> <20090803.012206.1492586399.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, hselasky@c2i.net, rwatson@FreeBSD.org, nparhar@gmail.com, svn-src-head@FreeBSD.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 17:46:32 -0000 On Mon, 3 Aug 2009, M. Warner Losh wrote: > In message: <200908030827.21108.hselasky@c2i.net> > : I see two solutions: > : > : 1) Disable the timekeeping if no keys are pressed. > : > : 2) Second option is to use getmicrotime. Actually what I need is just a > : millisecond time reference so I know when to repeat the last key. > : > : Any opinions? DELAY() or getmicrotime() ? DELAY(1) is somewhet usable. getmicrotime() is unusable because apart from the problems from it using microtime() (actually binuptime()), getmicrotime() has is only updated every 1/HZ seconds and depends on interrupts for the update. 1/HZ may usefully be as high as 1/10 seconds, and the update would never occur in ddb mode. microtime() is not a supported API in ddb or panic mode, but it works for short delays in most cases. Short means however long it takes for the hardware counter to wrap. See another reply for more details. binuptime() is better than microtime() for most purposes. Another problem with microtime() is that it is not guaranteed to be monotonic. The patch using microtime() has mounds of style bugs (mainly an empty line after almost every comment and statement). > I'd note the state at each poll, and if > 1ms has passed since the > down event, I'd repeat. I wouldn't use DELAY at all to see if you > needed to repeat: I'd let the clocking of the polling drive you here > (eg, you know that someone else will call it a lot, so leverage that > to avoid the delay). Determining whether 1 mS has elapsed is not supported in ddb or panic mode by any API, except microtime() usually works (see above). For polled console input (not necessarily in ddb or panic mode). It shouldn't be necessary for the low-level driver to spin internally, since cngetc() spins externally. ddb mode is the only mode that actually works almost right here: ddb disables all interrupts and stops all other CPUs, so interrupts and other CPUs can't eat the input. However, state changes to set up for polling, if any, should occur at a higher level (on entry to ddb for ddb mode), not on every call to cncheckc() or even on every call to cngetc(). The changes would be device-specific and wouldn't depend on disabling all interrupts and stopping all other CPUs. Then all modes would work (of fail) similarly to ddb mode. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:20:18 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01737106564A; Mon, 3 Aug 2009 18:20:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 85A018FC0C; Mon, 3 Aug 2009 18:20:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-212.carlnfd1.nsw.optusnet.com.au (c122-106-149-212.carlnfd1.nsw.optusnet.com.au [122.106.149.212]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n73IJhOA020653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Aug 2009 04:19:44 +1000 Date: Tue, 4 Aug 2009 04:19:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Watson In-Reply-To: Message-ID: <20090804034625.I21599@delplex.bde.org> References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> <200908031129.06315.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ed Schouten , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Alfred Perlstein , Hans Petter Selasky , Navdeep Parhar , svn-src-head@FreeBSD.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:20:18 -0000 On Mon, 3 Aug 2009, Robert Watson wrote: > On Mon, 3 Aug 2009, Hans Petter Selasky wrote: >> I think getmicrotime relies on interrupts, while microtime doesn't. >> >> See "man microtime". > > You're right, but that doesn't make things better :-). Some of the > tc_get_timecount() calls are safe in the DDB environment, but several are > not. In particular, tick_get_timecount_mp() and i8254_get_timecount() both > acquire locks, the former the thread scheduler lock, and the latter a > dedicated spinlock. This produces the opportunity for rather nasty deadlocks > in DDB, especially tick_get_timecount_mp() on sparc64. Hmm, why does tick_get_timecount_mp() need to bind curthread? (I don't understand sparc64.) Any hardware clock potentially needs locking like that in i8254_get_timecount(), but most hardware is not so bad. DELAY() also wants to use the i8254 in some configurations. On amd64 and i386, it uses a hack to avoid the lock in ddb mode. Deadlock from not doing this rarely occurred, and deadlock on the thread lock would be more common. tc_get_timecount() calls could do something similar in some cases. E.g., tick_get_timecount_mp() can just skip the locking since entering ddb mode is stronger than sched binding, but i8254_get_timecount() cannot do this safely so easily since it needs to write to the hardware and the hardware has write-only state (the state would have to be shadowed in memory). Another problem with using microtime() is that the timecounter hardware might wrap after a short time. Again the i8254 timecounter is a problem. At HZ=1000, it wraps after 1mS. This can be handled by polling spinloops if necessary by calling microtime() enough to detect all wraps and adding up deltas of microtime()s to get the elapsed time. Apart from deadlock, just calling mutex locking code from within ddb is not supported (but it happens anywyay :-()). > This was the bug I was actually looking for in your patch, but then misread > microtime() and concluded you had a different one. :-) I would much rather > not have DDB rely on, for example, not contending thread_lock(), than have > key repeat in DDB. If cngetc() worked right then you would also not have key repeat for polled input outside of ddb :-), but polled input is probably used more in ddb than anywhere else (e.g., for booting), so you would probably miss it mainly in ddb. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:33:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AE441065674; Mon, 3 Aug 2009 18:33:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 4851E8FC20; Mon, 3 Aug 2009 18:33:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GB8WYDQo1twA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=8kQB0OdkAAAA:8 a=jLZIlSE2p0-g7UWB96EA:9 a=5ocN6vfTY-oPw3kcfPYA:7 a=_xabkXgocQkS6TZn6XAcsfAHLIIA:4 a=9aOQ2cSd83gA:10 a=LDJSNgQqv9YS3UIxoDEA:9 a=vYSQaxOngYuaPbuBOYmfoldUcGEA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1289462337; Mon, 03 Aug 2009 20:33:09 +0200 From: Hans Petter Selasky To: Bruce Evans Date: Mon, 3 Aug 2009 20:33:04 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> In-Reply-To: <20090804032402.J21599@delplex.bde.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_k1ydKb8nTi1cteP" Message-Id: <200908032033.08169.hselasky@c2i.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:33:13 -0000 --Boundary-00=_k1ydKb8nTi1cteP Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > On Mon, 3 Aug 2009, M. Warner Losh wrote: > > In message: <200908030827.21108.hselasky@c2i.net> > > > > : I see two solutions: > > : > > : 1) Disable the timekeeping if no keys are pressed. > > : > > : 2) Second option is to use getmicrotime. Actually what I need is just a > > : millisecond time reference so I know when to repeat the last key. > > : > > : Any opinions? DELAY() or getmicrotime() ? > > DELAY(1) is somewhet usable. I think DELAY(1) is not accurate enough. I suggest that the DELAY(1000) is only active while a key is actually pressed. See attached patch. Please test and report back. --HPS > > getmicrotime() is unusable because apart from the problems from it using > microtime() (actually binuptime()), getmicrotime() has is only updated > every 1/HZ seconds and depends on interrupts for the update. 1/HZ may > usefully be as high as 1/10 seconds, and the update would never occur > in ddb mode. > > microtime() is not a supported API in ddb or panic mode, but it works > for short delays in most cases. Short means however long it takes for > the hardware counter to wrap. See another reply for more details. > > binuptime() is better than microtime() for most purposes. Another > problem with microtime() is that it is not guaranteed to be monotonic. > > The patch using microtime() has mounds of style bugs (mainly an empty > line after almost every comment and statement). > > > I'd note the state at each poll, and if > 1ms has passed since the > > down event, I'd repeat. I wouldn't use DELAY at all to see if you > > needed to repeat: I'd let the clocking of the polling drive you here > > (eg, you know that someone else will call it a lot, so leverage that > > to avoid the delay). > > Determining whether 1 mS has elapsed is not supported in ddb or panic > mode by any API, except microtime() usually works (see above). > > For polled console input (not necessarily in ddb or panic mode). It > shouldn't be necessary for the low-level driver to spin internally, > since cngetc() spins externally. ddb mode is the only mode that > actually works almost right here: ddb disables all interrupts and stops > all other CPUs, so interrupts and other CPUs can't eat the input. > However, state changes to set up for polling, if any, should occur at > a higher level (on entry to ddb for ddb mode), not on every call to > cncheckc() or even on every call to cngetc(). The changes would be > device-specific and wouldn't depend on disabling all interrupts and > stopping all other CPUs. Then all modes would work (of fail) similarly > to ddb mode. > > Bruce --Boundary-00=_k1ydKb8nTi1cteP Content-Type: text/x-patch; charset="iso-8859-1"; name="ukbd.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ukbd.c.diff" --- ukbd.c 2009-08-02 16:28:40.000000000 +0200 +++ ukbd.c 2009-08-03 20:28:09.000000000 +0200 @@ -302,17 +302,27 @@ static void ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait) { + uint8_t i; + uint8_t j; + DPRINTFN(2, "polling\n"); while (sc->sc_inputs == 0) { usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER); - DELAY(1000); /* delay 1 ms */ + /* Delay-optimised support for repetition of keys */ - sc->sc_time_ms++; + for (j = i = 0; i < UKBD_NKEYCODE; i++) + j |= sc->sc_odata.keycode[i]; - /* support repetition of keys: */ + if (j) { + /* a key is pressed - need timekeeping */ + DELAY(1000); + + /* 1 millisecond has passed */ + sc->sc_time_ms += 1; + } ukbd_interrupt(sc); --Boundary-00=_k1ydKb8nTi1cteP-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:43:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70004106564A; Mon, 3 Aug 2009 18:43:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CFC48FC19; Mon, 3 Aug 2009 18:43:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73IhQmG093864; Mon, 3 Aug 2009 18:43:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73IhQ3O093863; Mon, 3 Aug 2009 18:43:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200908031843.n73IhQ3O093863@svn.freebsd.org> From: Xin LI Date: Mon, 3 Aug 2009 18:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196051 - stable/7/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:43:28 -0000 Author: delphij Date: Mon Aug 3 18:43:26 2009 New Revision: 196051 URL: http://svn.freebsd.org/changeset/base/196051 Log: MFC r193021: Add an EXIT STATUS section to the manual page. Currently, nc(1) does not follow sysexits(3), and returns 1 for all error cases. PR: docs/126451 Modified: stable/7/contrib/netcat/ (props changed) stable/7/contrib/netcat/nc.1 Modified: stable/7/contrib/netcat/nc.1 ============================================================================== --- stable/7/contrib/netcat/nc.1 Mon Aug 3 09:58:46 2009 (r196050) +++ stable/7/contrib/netcat/nc.1 Mon Aug 3 18:43:26 2009 (r196051) @@ -433,6 +433,8 @@ The same example again, this time enabli if the proxy requires it: .Pp .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42 +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr cat 1 , .Xr ssh 1 From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:44:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AF661065672; Mon, 3 Aug 2009 18:44:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 388C68FC13; Mon, 3 Aug 2009 18:44:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73IihxD093957; Mon, 3 Aug 2009 18:44:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73IihDw093955; Mon, 3 Aug 2009 18:44:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200908031844.n73IihDw093955@svn.freebsd.org> From: Xin LI Date: Mon, 3 Aug 2009 18:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196052 - stable/6/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:44:44 -0000 Author: delphij Date: Mon Aug 3 18:44:42 2009 New Revision: 196052 URL: http://svn.freebsd.org/changeset/base/196052 Log: MFC r193021: Add an EXIT STATUS section to the manual page. Currently, nc(1) does not follow sysexits(3), and returns 1 for all error cases. PR: docs/126451 Modified: stable/6/contrib/netcat/ (props changed) stable/6/contrib/netcat/nc.1 Modified: stable/6/contrib/netcat/nc.1 ============================================================================== --- stable/6/contrib/netcat/nc.1 Mon Aug 3 18:43:26 2009 (r196051) +++ stable/6/contrib/netcat/nc.1 Mon Aug 3 18:44:42 2009 (r196052) @@ -433,6 +433,8 @@ The same example again, this time enabli if the proxy requires it: .Pp .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42 +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr cat 1 , .Xr ssh 1 From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:46:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3AAA1065672; Mon, 3 Aug 2009 18:46:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AA9EB8FC13; Mon, 3 Aug 2009 18:46:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 6289246B0C; Mon, 3 Aug 2009 14:46:25 -0400 (EDT) Date: Mon, 3 Aug 2009 19:46:25 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200908032033.08169.hselasky@c2i.net> Message-ID: References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:46:26 -0000 On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >> >> DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually > pressed. > > See attached patch. Please test and report back. This seems a reasonable middle ground -- avoids use of sensitive time counters in DDB, avoids expensive poll operation most of the time, and allows key repeat to work, which is especially nice for backspace in DDB. :-) Robert From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:50:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83CFA1065678; Mon, 3 Aug 2009 18:50:06 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id CF3158FC13; Mon, 3 Aug 2009 18:50:05 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 1D58A5829B; Mon, 3 Aug 2009 13:50:05 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id cn-EU+qqfkxY; Mon, 3 Aug 2009 13:50:05 -0500 (CDT) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-208.icecube.wisc.edu [172.16.223.208]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 4B76A5829D; Mon, 3 Aug 2009 13:50:03 -0500 (CDT) Message-ID: <4A77315A.3050606@freebsd.org> Date: Mon, 03 Aug 2009 13:50:02 -0500 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.22 (X11/20090731) MIME-Version: 1.0 To: Hans Petter Selasky References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> In-Reply-To: <200908032033.08169.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:50:07 -0000 Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >> >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >>> >> DELAY(1) is somewhet usable. >> > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. > Having recently written a keyboard driver, it is silly that the keyboard driver itself has to handle key repeat at all -- this kind of thing should be in the general kdb driver, along with AT KBD scancode emulation. Of the four keyboard drivers currently in the tree, three (sunkbd, akbd, ukbd) have a huge amount of code copied and pasted between them in order to emulate an AT keyboard, which are becoming less and less common. -Nathan From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 19:02:24 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 962201065673; Mon, 3 Aug 2009 19:02:24 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 60B5F8FC0A; Mon, 3 Aug 2009 19:02:24 +0000 (UTC) (envelope-from sam@errno.com) Received: from ice.local ([10.0.0.115]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n73J283c011632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Aug 2009 12:02:08 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4A773430.2050804@errno.com> Date: Mon, 03 Aug 2009 12:02:08 -0700 From: Sam Leffler User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Robert Watson References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-CollegeOfNewCaledonia-Metrics: ebb.errno.com; whitelist Cc: src-committers@FreeBSD.org, Bruce Evans , svn-src-all@FreeBSD.org, alfred@FreeBSD.org, Hans Petter Selasky , nparhar@gmail.com, svn-src-head@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 19:02:25 -0000 Robert Watson wrote: > > On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > >> On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >>> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>>> In message: <200908030827.21108.hselasky@c2i.net> >>>> >>>> : I see two solutions: >>>> : >>>> : 1) Disable the timekeeping if no keys are pressed. >>>> : >>>> : 2) Second option is to use getmicrotime. Actually what I need is >>>> just a >>>> : millisecond time reference so I know when to repeat the last key. >>>> : >>>> : Any opinions? DELAY() or getmicrotime() ? >>> >>> DELAY(1) is somewhet usable. >> >> I think DELAY(1) is not accurate enough. >> >> I suggest that the DELAY(1000) is only active while a key is actually >> pressed. >> >> See attached patch. Please test and report back. > > This seems a reasonable middle ground -- avoids use of sensitive time > counters in DDB, avoids expensive poll operation most of the time, and > allows key repeat to work, which is especially nice for backspace in > DDB. :-) I think we are losing sight of the goal here. We are in a release schedule and trying to find a minimal set of changes that resolves our immediate need. Keyboard repeat is not required and unless there is an obvious and immediate solution it should be considered AFTER the release. Remember we are already behind schedule for 8.0. Sam From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:09:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAACE1065673; Mon, 3 Aug 2009 20:09:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B633B8FC12; Mon, 3 Aug 2009 20:09:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73K9spj095659; Mon, 3 Aug 2009 20:09:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73K9srk095654; Mon, 3 Aug 2009 20:09:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032009.n73K9srk095654@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196053 - in stable/7: etc/defaults etc/namedb etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:09:55 -0000 Author: dougb Date: Mon Aug 3 20:09:54 2009 New Revision: 196053 URL: http://svn.freebsd.org/changeset/base/196053 Log: MFC r192210, a whitespace only change in rc.d/named, and MFC r192215: named_wait feature, auto-forward feature, add named-checkconf to startup Modified: stable/7/etc/defaults/rc.conf stable/7/etc/namedb/named.conf stable/7/etc/rc.d/named stable/7/share/man/man5/rc.conf.5 (contents, props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/defaults/rc.conf Mon Aug 3 20:09:54 2009 (r196053) @@ -241,6 +241,7 @@ inetd_flags="-wW -C 60" # Optional flag # named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. +named_conf="/etc/namedb/named.conf" # Path to the configuration file #named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as @@ -248,6 +249,10 @@ named_chrootdir="/var/named" # Chroot di named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink the chrooted pid file +named_wait="NO" # Wait for working name service before exiting +named_wait_host="localhost" # Hostname to check if named_wait is enabled +named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf +named_auto_forward_only="NO" # Do "forward only" instead of "forward first" # # kerberos. Do not run the admin daemons on slave servers Modified: stable/7/etc/namedb/named.conf ============================================================================== --- stable/7/etc/namedb/named.conf Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/namedb/named.conf Mon Aug 3 20:09:54 2009 (r196053) @@ -31,12 +31,6 @@ options { disable-empty-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; -// In addition to the "forwarders" clause, you can force your name -// server to never initiate queries of its own, but always ask its -// forwarders only, by enabling the following line: -// -// forward only; - // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. @@ -45,6 +39,20 @@ options { 127.0.0.1; }; */ + +// If the 'forwarders' clause is not empty the default is to 'forward first' +// which will fall back to sending a query from your local server if the name +// servers in 'forwarders' do not have the answer. Alternatively you can +// force your name server to never initiate queries of its own by enabling the +// following line: +// forward only; + +// If you wish to have forwarding configured automatically based on +// the entries in /etc/resolv.conf, uncomment the following line and +// set named_auto_forward=yes in /etc/rc.conf. You can also enable +// named_auto_forward_only (the effect of which is described above). +// include "/etc/namedb/auto_forward.conf"; + /* Modern versions of BIND use a random UDP port for each outgoing query by default in order to dramatically reduce the possibility Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/rc.d/named Mon Aug 3 20:09:54 2009 (r196053) @@ -16,7 +16,7 @@ command="/usr/sbin/named" extra_commands="reload" start_precmd="named_precmd" -start_postcmd="make_symlinks" +start_postcmd="named_poststart" reload_cmd="named_reload" stop_cmd="named_stop" stop_postcmd="named_poststop" @@ -79,7 +79,7 @@ chroot_autoupdate() fi fi - # Copy and/or update key files to the chroot /etc + # Copy and/or update key files to the chroot /etc # for file in localtime protocols services; do if [ -r /etc/$file ]; then @@ -97,6 +97,17 @@ make_symlinks() ln -fs "${named_chrootdir}${pidfile}" ${pidfile} } +named_poststart () { + make_symlinks + + if checkyesno named_wait; then + until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do + echo " Waiting for nameserver to resolve $named_wait_host" + sleep 1 + done + fi +} + named_reload() { ${command%/named}/rndc reload @@ -135,8 +146,19 @@ named_poststop() fi } +create_file () { + if [ -e "$1" ]; then + unlink $1 + fi + > $1 + chown root:wheel $1 + chmod 644 $1 +} + named_precmd() { + local line nsip firstns + # Is the user using a sandbox? # if [ -n "$named_chrootdir" ]; then @@ -161,6 +183,80 @@ named_precmd() else $confgen_command fi + + # Create a forwarder configuration based on /etc/resolv.conf + if checkyesno named_auto_forward; then + if [ ! -s /etc/resolv.conf ]; then + warn "named_auto_forward enabled, but no /etc/resolv.conf" + + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' + return + fi + + create_file /var/run/naf-resolv.conf + create_file /var/run/auto_forward.conf + + echo ' forwarders {' > /var/run/auto_forward.conf + + while read line; do + case "$line" in + 'nameserver '*|'nameserver '*) + nsip=${line##nameserver[ ]} + + if [ -z "$firstns" ]; then + if [ ! "$nsip" = '127.0.0.1' ]; then + echo 'nameserver 127.0.0.1' + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + + firstns=1 + else + [ "$nsip" = '127.0.0.1' ] && continue + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + ;; + esac + + echo $line + done < /etc/resolv.conf > /var/run/naf-resolv.conf + + echo ' };' >> /var/run/auto_forward.conf + echo '' >> /var/run/auto_forward.conf + if checkyesno named_auto_forward_only; then + echo " forward only;" >> /var/run/auto_forward.conf + else + echo " forward first;" >> /var/run/auto_forward.conf + fi + + if cmp -s /etc/resolv.conf /var/run/naf-resolv.conf; then + unlink /var/run/naf-resolv.conf + else + [ -e /etc/resolv.conf ] && unlink /etc/resolv.conf + mv /var/run/naf-resolv.conf /etc/resolv.conf + fi + + if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + /var/run/auto_forward.conf; then + unlink /var/run/auto_forward.conf + else + [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + mv /var/run/auto_forward.conf \ + ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + else + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' } load_rc_config $name Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/share/man/man5/rc.conf.5 Mon Aug 3 20:09:54 2009 (r196053) @@ -1594,6 +1594,12 @@ Path to .Xr named 8 (default .Pa /usr/sbin/named ) . +.It Va named_conf +.Pq Vt str +Path to +.Xr named 8 +configuration file, (default +.Pa /etc/namedb/named.conf ) . .It Va named_flags .Pq Vt str If @@ -1641,6 +1647,26 @@ daemon's PID file into the .Xr chroot 8 environment. +.It Va named_wait +.Pq Vt bool +Set to have +.Pa /etc/rc.d/named +loop until working name service is established. +.It Va named_wait_host +.Pq Vt str +Name of host to lookup for the named_wait option. +(Default localhost) +.It Va named_auto_forward +.Pq Vt bool +Set to enable automatic creation of a forwarder +configuration file derived from +.Pa /etc/resolv.conf . +.It Va named_auto_forward_only +.Pq Vt bool +Set to change the default forwarder configuration from +.Dq forward first +to +.Dq forward only . .It Va kerberos5_server_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:14:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A498E106564A; Mon, 3 Aug 2009 20:14:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907DE8FC0C; Mon, 3 Aug 2009 20:14:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73KE0VX095867; Mon, 3 Aug 2009 20:14:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73KE0Lg095862; Mon, 3 Aug 2009 20:14:00 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032014.n73KE0Lg095862@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196054 - in stable/6: etc/defaults etc/namedb etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:14:01 -0000 Author: dougb Date: Mon Aug 3 20:14:00 2009 New Revision: 196054 URL: http://svn.freebsd.org/changeset/base/196054 Log: MFC r192210, a whitespace only change in rc.d/named, and MFC r192215: named_wait feature, auto-forward feature, add named-checkconf to startup Modified: stable/6/etc/defaults/rc.conf stable/6/etc/namedb/named.conf stable/6/etc/rc.d/named stable/6/share/man/man5/rc.conf.5 (contents, props changed) Modified: stable/6/etc/defaults/rc.conf ============================================================================== --- stable/6/etc/defaults/rc.conf Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/defaults/rc.conf Mon Aug 3 20:14:00 2009 (r196054) @@ -221,6 +221,7 @@ inetd_flags="-wW -C 60" # Optional flag # named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. +named_conf="/etc/namedb/named.conf" # Path to the configuration file #named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as @@ -228,6 +229,10 @@ named_chrootdir="/var/named" # Chroot di named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink the chrooted pid file +named_wait="NO" # Wait for working name service before exiting +named_wait_host="localhost" # Hostname to check if named_wait is enabled +named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf +named_auto_forward_only="NO" # Do "forward only" instead of "forward first" # # kerberos. Do not run the admin daemons on slave servers Modified: stable/6/etc/namedb/named.conf ============================================================================== --- stable/6/etc/namedb/named.conf Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/namedb/named.conf Mon Aug 3 20:14:00 2009 (r196054) @@ -33,12 +33,6 @@ options { disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; */ -// In addition to the "forwarders" clause, you can force your name -// server to never initiate queries of its own, but always ask its -// forwarders only, by enabling the following line: -// -// forward only; - // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. @@ -47,6 +41,20 @@ options { 127.0.0.1; }; */ + +// If the 'forwarders' clause is not empty the default is to 'forward first' +// which will fall back to sending a query from your local server if the name +// servers in 'forwarders' do not have the answer. Alternatively you can +// force your name server to never initiate queries of its own by enabling the +// following line: +// forward only; + +// If you wish to have forwarding configured automatically based on +// the entries in /etc/resolv.conf, uncomment the following line and +// set named_auto_forward=yes in /etc/rc.conf. You can also enable +// named_auto_forward_only (the effect of which is described above). +// include "/etc/namedb/auto_forward.conf"; + /* Modern versions of BIND use a random UDP port for each outgoing query by default in order to dramatically reduce the possibility Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/rc.d/named Mon Aug 3 20:14:00 2009 (r196054) @@ -16,7 +16,7 @@ command="/usr/sbin/named" extra_commands="reload" start_precmd="named_precmd" -start_postcmd="make_symlinks" +start_postcmd="named_poststart" reload_cmd="named_reload" stop_cmd="named_stop" stop_postcmd="named_poststop" @@ -79,7 +79,7 @@ chroot_autoupdate() fi fi - # Copy and/or update key files to the chroot /etc + # Copy and/or update key files to the chroot /etc # for file in localtime protocols services; do if [ -r /etc/$file ]; then @@ -97,6 +97,17 @@ make_symlinks() ln -fs "${named_chrootdir}${pidfile}" ${pidfile} } +named_poststart () { + make_symlinks + + if checkyesno named_wait; then + until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do + echo " Waiting for nameserver to resolve $named_wait_host" + sleep 1 + done + fi +} + named_reload() { ${command%/named}/rndc reload @@ -135,8 +146,19 @@ named_poststop() fi } +create_file () { + if [ -e "$1" ]; then + unlink $1 + fi + > $1 + chown root:wheel $1 + chmod 644 $1 +} + named_precmd() { + local line nsip firstns + # Is the user using a sandbox? # if [ -n "$named_chrootdir" ]; then @@ -161,6 +183,80 @@ named_precmd() else $confgen_command fi + + # Create a forwarder configuration based on /etc/resolv.conf + if checkyesno named_auto_forward; then + if [ ! -s /etc/resolv.conf ]; then + warn "named_auto_forward enabled, but no /etc/resolv.conf" + + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' + return + fi + + create_file /var/run/naf-resolv.conf + create_file /var/run/auto_forward.conf + + echo ' forwarders {' > /var/run/auto_forward.conf + + while read line; do + case "$line" in + 'nameserver '*|'nameserver '*) + nsip=${line##nameserver[ ]} + + if [ -z "$firstns" ]; then + if [ ! "$nsip" = '127.0.0.1' ]; then + echo 'nameserver 127.0.0.1' + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + + firstns=1 + else + [ "$nsip" = '127.0.0.1' ] && continue + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + ;; + esac + + echo $line + done < /etc/resolv.conf > /var/run/naf-resolv.conf + + echo ' };' >> /var/run/auto_forward.conf + echo '' >> /var/run/auto_forward.conf + if checkyesno named_auto_forward_only; then + echo " forward only;" >> /var/run/auto_forward.conf + else + echo " forward first;" >> /var/run/auto_forward.conf + fi + + if cmp -s /etc/resolv.conf /var/run/naf-resolv.conf; then + unlink /var/run/naf-resolv.conf + else + [ -e /etc/resolv.conf ] && unlink /etc/resolv.conf + mv /var/run/naf-resolv.conf /etc/resolv.conf + fi + + if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + /var/run/auto_forward.conf; then + unlink /var/run/auto_forward.conf + else + [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + mv /var/run/auto_forward.conf \ + ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + else + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' } load_rc_config $name Modified: stable/6/share/man/man5/rc.conf.5 ============================================================================== --- stable/6/share/man/man5/rc.conf.5 Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/share/man/man5/rc.conf.5 Mon Aug 3 20:14:00 2009 (r196054) @@ -1526,6 +1526,12 @@ Path to .Xr named 8 (default .Pa /usr/sbin/named ) . +.It Va named_conf +.Pq Vt str +Path to +.Xr named 8 +configuration file, (default +.Pa /etc/namedb/named.conf ) . .It Va named_flags .Pq Vt str If @@ -1571,6 +1577,26 @@ daemon's PID file into the .Xr chroot 8 environment. +.It Va named_wait +.Pq Vt bool +Set to have +.Pa /etc/rc.d/named +loop until working name service is established. +.It Va named_wait_host +.Pq Vt str +Name of host to lookup for the named_wait option. +(Default localhost) +.It Va named_auto_forward +.Pq Vt bool +Set to enable automatic creation of a forwarder +configuration file derived from +.Pa /etc/resolv.conf . +.It Va named_auto_forward_only +.Pq Vt bool +Set to change the default forwarder configuration from +.Dq forward first +to +.Dq forward only . .It Va kerberos5_server_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:20:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 897DC1065675; Mon, 3 Aug 2009 20:20:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76D5A8FC15; Mon, 3 Aug 2009 20:20:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73KKFSn096088; Mon, 3 Aug 2009 20:20:15 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73KKF0q096083; Mon, 3 Aug 2009 20:20:15 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032020.n73KKF0q096083@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196055 - in stable/7/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:20:16 -0000 Author: dougb Date: Mon Aug 3 20:20:15 2009 New Revision: 196055 URL: http://svn.freebsd.org/changeset/base/196055 Log: MFC r193119, quotation marks around the value of name= (i.e., diff reduction to HEAD) Modified: stable/7/etc/ (props changed) stable/7/etc/rc.d/archdep stable/7/etc/rc.d/moused stable/7/etc/rc.d/nscd stable/7/etc/rc.d/ntpd stable/7/etc/termcap.small (props changed) Modified: stable/7/etc/rc.d/archdep ============================================================================== --- stable/7/etc/rc.d/archdep Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/archdep Mon Aug 3 20:20:15 2009 (r196055) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=archdep +name="archdep" start_cmd="archdep_start" stop_cmd=":" Modified: stable/7/etc/rc.d/moused ============================================================================== --- stable/7/etc/rc.d/moused Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/moused Mon Aug 3 20:20:15 2009 (r196055) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=moused +name="moused" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_cmd="moused_start" Modified: stable/7/etc/rc.d/nscd ============================================================================== --- stable/7/etc/rc.d/nscd Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/nscd Mon Aug 3 20:20:15 2009 (r196055) @@ -18,7 +18,7 @@ . /etc/rc.subr -name=nscd +name="nscd" rcvar=`set_rcvar` command=/usr/sbin/nscd Modified: stable/7/etc/rc.d/ntpd ============================================================================== --- stable/7/etc/rc.d/ntpd Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/ntpd Mon Aug 3 20:20:15 2009 (r196055) @@ -10,7 +10,7 @@ . /etc/rc.subr -name=ntpd +name="ntpd" rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:22:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF16C10656D2; Mon, 3 Aug 2009 20:22:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB82D8FC16; Mon, 3 Aug 2009 20:22:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73KM2h5096197; Mon, 3 Aug 2009 20:22:02 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73KM2eh096193; Mon, 3 Aug 2009 20:22:02 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032022.n73KM2eh096193@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196056 - in stable/6/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:22:04 -0000 Author: dougb Date: Mon Aug 3 20:22:02 2009 New Revision: 196056 URL: http://svn.freebsd.org/changeset/base/196056 Log: MFC r193119, quotation marks around the value of name= (i.e., diff reduction to HEAD) Modified: stable/6/etc/ (props changed) stable/6/etc/rc.d/archdep stable/6/etc/rc.d/moused stable/6/etc/rc.d/ntpd Modified: stable/6/etc/rc.d/archdep ============================================================================== --- stable/6/etc/rc.d/archdep Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/archdep Mon Aug 3 20:22:02 2009 (r196056) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=archdep +name="archdep" start_cmd="archdep_start" stop_cmd=":" Modified: stable/6/etc/rc.d/moused ============================================================================== --- stable/6/etc/rc.d/moused Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/moused Mon Aug 3 20:22:02 2009 (r196056) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=moused +name="moused" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_cmd="moused_start" Modified: stable/6/etc/rc.d/ntpd ============================================================================== --- stable/6/etc/rc.d/ntpd Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/ntpd Mon Aug 3 20:22:02 2009 (r196056) @@ -10,7 +10,7 @@ . /etc/rc.subr -name=ntpd +name="ntpd" rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:24:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6931B106566B; Mon, 3 Aug 2009 20:24:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C54C8FC0C; Mon, 3 Aug 2009 20:24:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73KOWrO096296; Mon, 3 Aug 2009 20:24:32 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73KOWhN096290; Mon, 3 Aug 2009 20:24:32 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032024.n73KOWhN096290@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196057 - in stable/7/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:24:33 -0000 Author: dougb Date: Mon Aug 3 20:24:31 2009 New Revision: 196057 URL: http://svn.freebsd.org/changeset/base/196057 Log: MFC r193197, substitute ypset for ypbind in REQUIRE lines. Modified: stable/7/etc/ (props changed) stable/7/etc/rc.d/amd stable/7/etc/rc.d/keyserv stable/7/etc/rc.d/nisdomain stable/7/etc/rc.d/quota stable/7/etc/rc.d/yppasswdd stable/7/etc/termcap.small (props changed) Modified: stable/7/etc/rc.d/amd ============================================================================== --- stable/7/etc/rc.d/amd Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/amd Mon Aug 3 20:24:31 2009 (r196057) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: stable/7/etc/rc.d/keyserv ============================================================================== --- stable/7/etc/rc.d/keyserv Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/keyserv Mon Aug 3 20:24:31 2009 (r196057) @@ -6,7 +6,7 @@ # Start keyserv if we are running Secure RPC # PROVIDE: keyserv -# REQUIRE: ypbind +# REQUIRE: ypset # BEFORE: DAEMON # KEYWORD: shutdown Modified: stable/7/etc/rc.d/nisdomain ============================================================================== --- stable/7/etc/rc.d/nisdomain Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/nisdomain Mon Aug 3 20:24:31 2009 (r196057) @@ -28,7 +28,7 @@ # PROVIDE: nisdomain # REQUIRE: SERVERS rpcbind -# BEFORE: ypbind ypserv ypxfrd +# BEFORE: ypset ypbind ypserv ypxfrd . /etc/rc.subr Modified: stable/7/etc/rc.d/quota ============================================================================== --- stable/7/etc/rc.d/quota Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/quota Mon Aug 3 20:24:31 2009 (r196057) @@ -6,7 +6,7 @@ # Enable/Check the quotas (must be after ypbind if using NIS) # PROVIDE: quota -# REQUIRE: mountcritremote +# REQUIRE: mountcritremote ypset # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/7/etc/rc.d/yppasswdd ============================================================================== --- stable/7/etc/rc.d/yppasswdd Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/yppasswdd Mon Aug 3 20:24:31 2009 (r196057) @@ -4,7 +4,7 @@ # # PROVIDE: yppasswdd -# REQUIRE: ypserv ypbind +# REQUIRE: ypserv ypset # BEFORE: LOGIN # KEYWORD: shutdown From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:26:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1068E106566B; Mon, 3 Aug 2009 20:26:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF25F8FC0A; Mon, 3 Aug 2009 20:26:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n73KQtoc096404; Mon, 3 Aug 2009 20:26:55 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n73KQtrw096398; Mon, 3 Aug 2009 20:26:55 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908032026.n73KQtrw096398@svn.freebsd.org> From: Doug Barton Date: Mon, 3 Aug 2009 20:26:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196058 - in stable/6/etc: . bluetooth defaults etc.alpha etc.amd64 etc.arm etc.i386 etc.ia64 etc.powerpc etc.sparc64 isdn mail mtree namedb pam.d periodic ppp rc.d root sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:26:56 -0000 Author: dougb Date: Mon Aug 3 20:26:55 2009 New Revision: 196058 URL: http://svn.freebsd.org/changeset/base/196058 Log: MFC r193197, substitute ypset for ypbind in REQUIRE lines. Modified: stable/6/etc/ (props changed) stable/6/etc/Makefile (props changed) stable/6/etc/amd.map (props changed) stable/6/etc/apmd.conf (props changed) stable/6/etc/auth.conf (props changed) stable/6/etc/bluetooth/ (props changed) stable/6/etc/crontab (props changed) stable/6/etc/csh.cshrc (props changed) stable/6/etc/csh.login (props changed) stable/6/etc/csh.logout (props changed) stable/6/etc/defaults/ (props changed) stable/6/etc/devd.conf (props changed) stable/6/etc/devfs.conf (props changed) stable/6/etc/dhclient.conf (props changed) stable/6/etc/disktab (props changed) stable/6/etc/etc.alpha/ (props changed) stable/6/etc/etc.amd64/ (props changed) stable/6/etc/etc.arm/ (props changed) stable/6/etc/etc.i386/ (props changed) stable/6/etc/etc.ia64/ (props changed) stable/6/etc/etc.powerpc/ (props changed) stable/6/etc/etc.sparc64/ (props changed) stable/6/etc/fbtab (props changed) stable/6/etc/freebsd-update.conf (props changed) stable/6/etc/ftpusers (props changed) stable/6/etc/gettytab (props changed) stable/6/etc/group (props changed) stable/6/etc/hosts (props changed) stable/6/etc/hosts.allow (props changed) stable/6/etc/hosts.equiv (props changed) stable/6/etc/hosts.lpd (props changed) stable/6/etc/inetd.conf (props changed) stable/6/etc/isdn/ (props changed) stable/6/etc/login.access (props changed) stable/6/etc/login.conf (props changed) stable/6/etc/mac.conf (props changed) stable/6/etc/mail/ (props changed) stable/6/etc/man.alias (props changed) stable/6/etc/master.passwd (props changed) stable/6/etc/minfree (props changed) stable/6/etc/motd (props changed) stable/6/etc/mtree/ (props changed) stable/6/etc/namedb/ (props changed) stable/6/etc/netconfig (props changed) stable/6/etc/netstart (props changed) stable/6/etc/network.subr (props changed) stable/6/etc/networks (props changed) stable/6/etc/newsyslog.conf (props changed) stable/6/etc/nls.alias (props changed) stable/6/etc/nsmb.conf (props changed) stable/6/etc/opieaccess (props changed) stable/6/etc/pam.d/ (props changed) stable/6/etc/pccard_ether (props changed) stable/6/etc/periodic/ (props changed) stable/6/etc/pf.conf (props changed) stable/6/etc/pf.os (props changed) stable/6/etc/phones (props changed) stable/6/etc/portsnap.conf (props changed) stable/6/etc/ppp/ (props changed) stable/6/etc/printcap (props changed) stable/6/etc/profile (props changed) stable/6/etc/protocols (props changed) stable/6/etc/rc (props changed) stable/6/etc/rc.bsdextended (props changed) stable/6/etc/rc.d/ (props changed) stable/6/etc/rc.d/amd stable/6/etc/rc.d/keyserv stable/6/etc/rc.d/nisdomain stable/6/etc/rc.d/quota stable/6/etc/rc.d/yppasswdd stable/6/etc/rc.firewall (props changed) stable/6/etc/rc.firewall6 (props changed) stable/6/etc/rc.initdiskless (props changed) stable/6/etc/rc.resume (props changed) stable/6/etc/rc.sendmail (props changed) stable/6/etc/rc.shutdown (props changed) stable/6/etc/rc.subr (props changed) stable/6/etc/rc.suspend (props changed) stable/6/etc/remote (props changed) stable/6/etc/root/ (props changed) stable/6/etc/rpc (props changed) stable/6/etc/sendmail/ (props changed) stable/6/etc/services (props changed) stable/6/etc/shells (props changed) stable/6/etc/snmpd.config (props changed) stable/6/etc/sysctl.conf (props changed) stable/6/etc/syslog.conf (props changed) stable/6/etc/termcap.small (props changed) stable/6/etc/usbd.conf (props changed) Modified: stable/6/etc/rc.d/amd ============================================================================== --- stable/6/etc/rc.d/amd Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/amd Mon Aug 3 20:26:55 2009 (r196058) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/6/etc/rc.d/keyserv ============================================================================== --- stable/6/etc/rc.d/keyserv Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/keyserv Mon Aug 3 20:26:55 2009 (r196058) @@ -6,7 +6,7 @@ # Start keyserv if we are running Secure RPC # PROVIDE: keyserv -# REQUIRE: ypbind +# REQUIRE: ypset # BEFORE: DAEMON . /etc/rc.subr Modified: stable/6/etc/rc.d/nisdomain ============================================================================== --- stable/6/etc/rc.d/nisdomain Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/nisdomain Mon Aug 3 20:26:55 2009 (r196058) @@ -28,7 +28,7 @@ # PROVIDE: nisdomain # REQUIRE: SERVERS rpcbind -# BEFORE: ypbind ypserv ypxfrd +# BEFORE: ypset ypbind ypserv ypxfrd . /etc/rc.subr Modified: stable/6/etc/rc.d/quota ============================================================================== --- stable/6/etc/rc.d/quota Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/quota Mon Aug 3 20:26:55 2009 (r196058) @@ -6,7 +6,7 @@ # Enable/Check the quotas (must be after ypbind if using NIS) # PROVIDE: quota -# REQUIRE: mountcritremote +# REQUIRE: mountcritremote ypset # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/6/etc/rc.d/yppasswdd ============================================================================== --- stable/6/etc/rc.d/yppasswdd Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/yppasswdd Mon Aug 3 20:26:55 2009 (r196058) @@ -4,7 +4,7 @@ # # PROVIDE: yppasswdd -# REQUIRE: ypserv ypbind +# REQUIRE: ypserv ypset # BEFORE: LOGIN . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 21:52:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627D0106566B; Mon, 3 Aug 2009 21:52:10 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from exhub015-2.exch015.msoutlookonline.net (exhub015-2.exch015.msoutlookonline.net [207.5.72.94]) by mx1.freebsd.org (Postfix) with ESMTP id 491038FC12; Mon, 3 Aug 2009 21:52:10 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from philip.hq.rws (98.141.235.114) by smtpx15.msoutlookonline.net (207.5.72.103) with Microsoft SMTP Server (TLS) id 8.1.375.2; Mon, 3 Aug 2009 14:42:08 -0700 Message-ID: <4A7759AC.10102@p6m7g8.com> Date: Mon, 3 Aug 2009 17:42:04 -0400 From: "Philip M. Gollucci" Organization: P6M&7G8 Inc. User-Agent: Thunderbird 2.0.0.22 (X11/20090709) MIME-Version: 1.0 To: Ken Smith References: <200908030942.n739gBuI043385@svn.freebsd.org> In-Reply-To: <200908030942.n739gBuI043385@svn.freebsd.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org Subject: Re: svn commit: r196047 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 21:52:11 -0000 X-SVN-Group: stable-other neeeds updating to X-SVN-Group: stable-8 now. Thx! -- ------------------------------------------------------------------------ 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Consultant - P6M7G8 Inc. http://p6m7g8.net Senior Sys Admin - RideCharge, Inc. http://ridecharge.com ASF Member - Apache Software Foundation http://apache.org FreeBSD Committer - FreeBSD Foundation http://freebsd.org Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 03:14:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1205) id 1342E106566B; Tue, 4 Aug 2009 03:14:07 +0000 (UTC) Date: Tue, 4 Aug 2009 03:14:07 +0000 From: Navdeep Parhar To: Hans Petter Selasky Message-ID: <20090804031407.GA8974@hub.freebsd.org> Mail-Followup-To: Hans Petter Selasky , Bruce Evans , "M. Warner Losh" , rwatson@freebsd.org, alfred@freebsd.org, nparhar@gmail.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200908032033.08169.hselasky@c2i.net> User-Agent: Mutt/1.4.2.1i Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 03:14:07 -0000 On Mon, Aug 03, 2009 at 08:33:04PM +0200, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > > On Mon, 3 Aug 2009, M. Warner Losh wrote: > > > In message: <200908030827.21108.hselasky@c2i.net> > > > > > > : I see two solutions: > > > : > > > : 1) Disable the timekeeping if no keys are pressed. > > > : > > > : 2) Second option is to use getmicrotime. Actually what I need is just a > > > : millisecond time reference so I know when to repeat the last key. > > > : > > > : Any opinions? DELAY() or getmicrotime() ? > > > > DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. This patch fixes my problem. The machine is remote and I'm unable to test whether the USB keyboard and keystroke repetition works, but core dumps to a SATA disk are now as fast as they were before r195960. Thanks. Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 07:57:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF301065675; Tue, 4 Aug 2009 07:57:41 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 30AE38FC08; Tue, 4 Aug 2009 07:57:40 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 6C8193BBFCA; Tue, 4 Aug 2009 03:57:40 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 04 Aug 2009 03:57:41 -0400 X-Sasl-enc: OyFhqSDsk1BFCvhRKOcpoLA4hyGurt9BbHgfqr7vZi94 1249372642 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 650A813BC4; Tue, 4 Aug 2009 03:57:22 -0400 (EDT) Message-ID: <4A77E9F1.6040407@incunabulum.net> Date: Tue, 04 Aug 2009 08:57:37 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Robert Watson References: <200908021943.n72JhWKX023102@svn.freebsd.org> In-Reply-To: <200908021943.n72JhWKX023102@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 07:57:41 -0000 Hey Robert, I didn't see any changes which directly touched ip_mroute in this rev. Can you clarify how this touches ip_mroute? It wasn't obvious from the diff. thanks, BMS Robert Watson wrote: > Log: > Many network stack subsystems use a single global data structure to hold > all pertinent statatistics for the subsystem. These structures are > sometimes "borrowed" by kernel modules that require a place to store > statistics for similar events. > ... > The following modules are affected by this change: > > if_bridge > if_cxgb > if_gif > ip_mroute > From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 08:26:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA636106566B; Tue, 4 Aug 2009 08:26:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A38FB8FC17; Tue, 4 Aug 2009 08:26:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 6473D46B09; Tue, 4 Aug 2009 04:26:49 -0400 (EDT) Date: Tue, 4 Aug 2009 09:26:49 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Simpson In-Reply-To: <4A77E9F1.6040407@incunabulum.net> Message-ID: References: <200908021943.n72JhWKX023102@svn.freebsd.org> <4A77E9F1.6040407@incunabulum.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 08:26:51 -0000 On Tue, 4 Aug 2009, Bruce Simpson wrote: > I didn't see any changes which directly touched ip_mroute in this rev. Can > you clarify how this touches ip_mroute? It wasn't obvious from the diff. You're right, it was included in error. ip_mroute is on the list of modules that uses a stats structure with an accessor macro, but that structure make it onto the list of structures requiring accessor functions because it's accessed only from within ip_mroute (actually, two such functions/macros). I must have made a transcription error when writing up the commit message. My notes on accessor macros and files that consume them below. Robert Defined Used ------- ---- ICMPSTAT_ADD icmp_var.h icmp_var.h ICMPSTAT_INC icmp_var.h ip_icmp.c, *pf.c IGMPSTAT_ADD igmp_var.h igmp_var.h IGMPSTAT_INC igmp_var.h igmp.c MRTSTAT_ADD ip_mroute.h ip_mroute.h MRTSTAT_INC ip_mroute.h *ip_mroute.c IPSTAT_ADD ip_var.h ip_var.h, ip_output.c, IPSTAT_SUB ip_var.h ip_var.h IPSTAT_INC ip_var.h raw_ip.c, *ip_divert.c, ip_output.c, ip_input.c, ip_ipsec.c, *in_gif.c, igmp.c, ip_options.c, ip_fastfwd.c, udp_usrreq.c, *if_bridge.c, *pf.c, ip_var.h IPSTAT_DEC ip_var.h raw_ip.c, *ip_divert.c, ip_var.h PIMSTAT_ADD pim_var.h *ip_mroute.c, pim_var.h PIMSTAT_INC pim_var.h *ip_mroute.c UDPSTAT_ADD udp_var.h udp_var.h UDPSTAT_INC udp_var.h udp_usrreq.c, udp6_usrreq.c, *pf.c TCPSTAT_ADD tcp_var.h tcp_input.c, tcp_reass.c, tcp_output.c, tcp_var.h TCPSTAT_INC tcp_var.h tcp_input.c, tcp_subr.c, tcp_reass.c, tcp_timer.c, tcp_sack.c, tcp_output.c, tcp_hostcache.c, tcp_syncache.c, tcp_usrreq.c, tcp_timewait.c, *cxgb_cpl_io.c, *pf.c IP6STAT_ADD ip6_var.h ip6_var.h IP6STAT_SUB ip6_var.h ip6_var.h IP6STAT_INC ip6_var.h raw_ip6.c, icmp6.c, udp6_usrreq.c, mld6.c, ip6_input.c IP6STAT_DEC ip6_var.h icmp6.c CARPSTATS_ADD ip_carp.h ip_carp.h CARPSTATS_INC ip_carp.h ip_carp.c ICMP6STAT_ADD icmp6.h icmp6.h ICMP6STAT_INC icmp6.h raw_ip6.c icmp6.c nd6.c nd6_nbr.c mld6.c nd6_rtr.c *pf.c * Files that are built into kernel modules. Things that use things they shouldn't: pf.c: ICMPSTAT_INC, IPSTAT_INC, UDPSTAT_INC, TCPSTAT_INC ip_divert.c: IPSTAT_INC, IPSTAT_DEC in_gif.c: IPSTAT_INC if_bridge.c: IPSTAT_INC cxgb_cpl_io.c: TCPSTAT_INC From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 08:55:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AB1106566B; Tue, 4 Aug 2009 08:55:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id C38AF8FC18; Tue, 4 Aug 2009 08:55:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-149-212.carlnfd1.nsw.optusnet.com.au [122.106.149.212]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n748tF5P012200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Aug 2009 18:55:16 +1000 Date: Tue, 4 Aug 2009 18:55:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky In-Reply-To: <200908032033.08169.hselasky@c2i.net> Message-ID: <20090804183824.J928@besplex.bde.org> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 08:55:27 -0000 On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >> >> DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. Indeed. But DELAY(10) is probably accurate enough, and certainly efficient enough (though ugly) since the atkbd device has used DELAY(7) and DELAY(20) for a long time without anyone noticing this slowing down disk i/o. It would take about 100 active console input drivers doing DELAY(10)'s to accumulate a delay of 1 mS. > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. Better. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 09:34:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C58E2106564A; Tue, 4 Aug 2009 09:34:40 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 948438FC13; Tue, 4 Aug 2009 09:34:40 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 0D4463BCC7E; Tue, 4 Aug 2009 05:34:40 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 04 Aug 2009 05:34:40 -0400 X-Sasl-enc: jTHRSgKDNeCUr2G8z1UvQK+7f76mt5VlV2pUPyv7FTe2 1249378462 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id A6C51456F; Tue, 4 Aug 2009 05:34:21 -0400 (EDT) Message-ID: <4A7800AB.8030907@incunabulum.net> Date: Tue, 04 Aug 2009 10:34:35 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Robert Watson References: <200908021943.n72JhWKX023102@svn.freebsd.org> <4A77E9F1.6040407@incunabulum.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 09:34:41 -0000 Robert Watson wrote: > > You're right, it was included in error. ip_mroute is on the list of > modules that uses a stats structure with an accessor macro, but that > structure make it onto the list of structures requiring accessor > functions because it's accessed only from within ip_mroute (actually, > two such functions/macros). I must have made a transcription error > when writing up the commit message. My notes on accessor macros and > files that consume them below. No worries, I was just going 'Hurm hah hurm wtf'. :-) From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 21:01:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625F31065670; Tue, 4 Aug 2009 21:01:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3109A8FC0C; Tue, 4 Aug 2009 21:01:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D8C4146B1A; Tue, 4 Aug 2009 17:01:58 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 0B1CE8A0AA; Tue, 4 Aug 2009 17:01:58 -0400 (EDT) From: John Baldwin To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= Date: Tue, 4 Aug 2009 08:09:05 -0400 User-Agent: KMail/1.9.7 References: <200908030813.n738D6x1040724@svn.freebsd.org> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> In-Reply-To: <868wi1vvqi.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908040809.06229.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 04 Aug 2009 17:01:58 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_06_12,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, Ken Smith Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 21:01:59 -0000 On Monday 03 August 2009 10:05:09 am Dag-Erling Sm=F8rgrav wrote: > Dimitry Andric writes: > > You might want to change [...] >=20 > Thanks, new patch attached. I vote for you to commit it. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 22:12:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79537106564A; Tue, 4 Aug 2009 22:12:02 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 38AFF8FC12; Tue, 4 Aug 2009 22:12:02 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EB4B86D41C; Tue, 4 Aug 2009 22:12:00 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BB89184495; Wed, 5 Aug 2009 00:12:00 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <200908030813.n738D6x1040724@svn.freebsd.org> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> <200908040809.06229.jhb@freebsd.org> Date: Wed, 05 Aug 2009 00:12:00 +0200 In-Reply-To: <200908040809.06229.jhb@freebsd.org> (John Baldwin's message of "Tue, 4 Aug 2009 08:09:05 -0400") Message-ID: <86skg744b3.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, Ken Smith Subject: Re: svn commit: r196045 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 22:12:02 -0000 John Baldwin writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Thanks, new patch attached. > I vote for you to commit it. I'd rather not do that without Peter's go-ahead... I asked him yesterday, but he hasn't answered yet. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Aug 6 08:55:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0748106566C; Thu, 6 Aug 2009 08:55:54 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF8CB8FC26; Thu, 6 Aug 2009 08:55:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n768tsKV048930; Thu, 6 Aug 2009 08:55:54 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n768tsHw048928; Thu, 6 Aug 2009 08:55:54 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200908060855.n768tsHw048928@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 6 Aug 2009 08:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196079 - stable/7/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 08:55:55 -0000 Author: maxim Date: Thu Aug 6 08:55:54 2009 New Revision: 196079 URL: http://svn.freebsd.org/changeset/base/196079 Log: MFC r195036: kill grammar nits. Modified: stable/7/sbin/ipfw/ (props changed) stable/7/sbin/ipfw/ipfw.8 Modified: stable/7/sbin/ipfw/ipfw.8 ============================================================================== --- stable/7/sbin/ipfw/ipfw.8 Wed Aug 5 23:05:11 2009 (r196078) +++ stable/7/sbin/ipfw/ipfw.8 Thu Aug 6 08:55:54 2009 (r196079) @@ -311,7 +311,7 @@ file systems are mounted (yet) by the ti is being run (e.g.\& when they are mounted over NFS). Once .Fl p -has been specified, any additional arguments as passed on to the preprocessor +has been specified, any additional arguments are passed on to the preprocessor for interpretation. This allows for flexible configuration files (like conditionalizing them on the local hostname) and the use of macros to centralize @@ -1903,7 +1903,7 @@ with .Dq "options HZ=1000" to reduce the granularity to 1ms or less). -Default value is 0, meaning no delay. +The default value is 0, meaning no delay. .El .Pp The following parameters can be configured for a queue: From owner-svn-src-all@FreeBSD.ORG Thu Aug 6 16:24:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE573106564A; Thu, 6 Aug 2009 16:24:03 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from eu1sys200aog117.obsmtp.com (eu1sys200aog117.obsmtp.com [207.126.144.143]) by mx1.freebsd.org (Postfix) with SMTP id 19A108FC1C; Thu, 6 Aug 2009 16:24:01 +0000 (UTC) Received: from source ([63.174.175.251]) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP ID DSNKSnsDoBGbxx8Kxn9/eD3h0+81FPo7mi9P@postini.com; Thu, 06 Aug 2009 16:24:03 UTC Received: from [0.0.0.0] (redeye.usdmm.com [172.17.0.14]) by bbbx3.usdmm.com (Postfix) with ESMTP id EF74DFD020; Thu, 6 Aug 2009 16:07:32 +0000 (UTC) Message-ID: <4A7AFFC4.5050607@tomjudge.com> Date: Thu, 06 Aug 2009 11:07:32 -0500 From: Tom Judge User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Stanislav Sedov References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> In-Reply-To: <20090721145559.d2cf3f0b.stas@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Christensen Subject: Re: svn commit: r189117 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 16:24:04 -0000 Hi, Stanislav Sedov wrote: > On Fri, 27 Feb 2009 19:25:06 +0000 (UTC) > David Christensen mentioned: > > >> Author: davidch >> Date: Fri Feb 27 19:25:06 2009 >> New Revision: 189117 >> URL: http://svn.freebsd.org/changeset/base/189117 >> >> Log: >> - Update copyright to 2009. >> - Only enable split header operation when ZERO_COPY_SOCKETS is enabled in >> the kernel. >> >> > > Hi, David! > > It appears that this change leads to excessive memory fragmentation due to > large number of 9k contiguous buffers allocations performed. I noticed > that under the relatively high load this can quickly lead to inability to send > any packets via bce(4) even on machines with high amount of memory (16 Gb). > I've been running with this change backed out for a long time and I don't > see any problems with this driver with last changes applied. > > I can confirm that we are also seeing this problem on a number of Dell PE2950 systems running the bce driver from 7.2, the bug is more visible/producible on systems that are using Jumbo Frames (in our case 8Kb). The symptoms of this are an increase in the requests for jumbo clusters denied counter at 9k, and then random network stalls which sometimes recover on there own and others require a reboot. We have backed this change and so far it seems to have fixed the issue. Regards Tom Judge From owner-svn-src-all@FreeBSD.ORG Thu Aug 6 19:47:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8983C1065678; Thu, 6 Aug 2009 19:47:18 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 038EA8FC24; Thu, 6 Aug 2009 19:47:16 +0000 (UTC) Received: by yxe11 with SMTP id 11so1348101yxe.3 for ; Thu, 06 Aug 2009 12:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=RzlpeEIFW+h9MmGI+ZKa05L1vaxLyXvjQtGybZSdodQ=; b=YegqQwRAcb+5nkR4PR97wTfdhvGxowTIYtc6Eod95GpQ0CrD2VdbMiCPsB0XnQqjOY /B77r9TprpyGmoxeV/AHXXpE8CFRr20m+uK7pHiNGWgpBpocbjxIBuzdE9y7yNIAEyAU m4UhJNg+qHXXz2ro5/YQKguOd5br0SPUy1PXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VWBvdTjmN37KbMSj/0mnTQcRPODrhmVKDZy+m5CCLpKUrmrR0DLP+z4lAtD49wljhk QsicPCqnEfwO3iFT9aYTz+J6+Eb4M0/ZxapDQ9AfOlFws16ySd6+cTTHTc2EtIb8RL9r N2aixRqQxeWWSDQPdx2UdQVUKVQoB5p7wjFzQ= MIME-Version: 1.0 Received: by 10.150.217.13 with SMTP id p13mr715930ybg.131.1249588036276; Thu, 06 Aug 2009 12:47:16 -0700 (PDT) In-Reply-To: <20090804031407.GA8974@hub.freebsd.org> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> <20090804031407.GA8974@hub.freebsd.org> Date: Thu, 6 Aug 2009 12:47:16 -0700 Message-ID: From: Navdeep Parhar To: Hans Petter Selasky , Bruce Evans , "M. Warner Losh" , rwatson@freebsd.org, alfred@freebsd.org, nparhar@gmail.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 19:47:20 -0000 >> >> See attached patch. Please test and report back. > > This patch fixes my problem. =A0The machine is remote and I'm unable > to test whether the USB keyboard and keystroke repetition works, but > core dumps to a SATA disk are now as fast as they were before > r195960. =A0Thanks. I finally got a chance to try a USB keyboard with ddb, and things did not go too well overall. While inside ddb, keystrokes were recognized properly and repetition worked too. But after exiting ddb, the keyboard wouldn't work - there wasn't any visible response to keystrokes. Also, I kept seeing the login prompt continually scroll up, as if someone was pressing repeatedly. It certainly wasn't me :-) Are you assuming that a user will not resume normal operation after entering the debugger? A panic/reboot isn't the only exit route from ddb..... Simple sequence of steps to reproduce problem: ctrl-alt-esc on the USB keyboard db> c Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 06:30:49 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBDF1065688; Fri, 7 Aug 2009 06:30:49 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.tele2.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id BBB208FC20; Fri, 7 Aug 2009 06:30:47 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GB8WYDQo1twA:10 a=hlIU1J3LQChSjWV/CGRL5g==:17 a=ikxiKnuPHMek6TsHBmkA:9 a=06WrWfJrRrwcvNk5UfkA:7 a=lY5AXd7MRfi4YnqSP7OrCBvou_oA:4 Received: from [193.217.167.6] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 550107684; Fri, 07 Aug 2009 08:30:46 +0200 From: Hans Petter Selasky To: Navdeep Parhar Date: Fri, 7 Aug 2009 08:30:45 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090802192902.GS47463@elvis.mu.org> <20090804031407.GA8974@hub.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908070830.47894.hselasky@c2i.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, Bruce Evans , svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 06:30:50 -0000 On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > >> See attached patch. Please test and report back. > > > > This patch fixes my problem. The machine is remote and I'm unable > > to test whether the USB keyboard and keystroke repetition works, but > > core dumps to a SATA disk are now as fast as they were before > > r195960. Thanks. > > I finally got a chance to try a USB keyboard with ddb, and things did > not go too well overall. While inside ddb, keystrokes were recognized > properly and repetition worked too. But after exiting ddb, the > keyboard wouldn't work - there wasn't any visible response to > keystrokes. Also, I kept seeing the login prompt continually scroll > up, as if someone was pressing repeatedly. It certainly > wasn't me :-) > > Are you assuming that a user will not resume normal operation after > entering the debugger? A panic/reboot isn't the only exit route from > ddb..... > > Simple sequence of steps to reproduce problem: > ctrl-alt-esc on the USB keyboard > db> c This is like expected. Once paniced, USB operation is blocked on the USB controller which the keyboard belongs to, because USB does not receive any polling-complete call, so that it can clean up the state in the USB controller! This mainly has to do with avoid calling wakeup() during polling. To avoid wakeup() calls, USB sets some bits, which must be cleared when polling is complete, which is currently not done, because USB doesn't know when polling is complete ... --HPS From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 06:57:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 176D4106566C; Fri, 7 Aug 2009 06:57:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C7B858FC1C; Fri, 7 Aug 2009 06:57:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n776rBgQ006298; Fri, 7 Aug 2009 00:53:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 07 Aug 2009 00:54:00 -0600 (MDT) Message-Id: <20090807.005400.-1749708164.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200908070830.47894.hselasky@c2i.net> References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, nparhar@gmail.com, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, svn-src-head@freebsd.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 06:57:30 -0000 In message: <200908070830.47894.hselasky@c2i.net> Hans Petter Selasky writes: : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: : > >> See attached patch. Please test and report back. : > > : > > This patch fixes my problem. The machine is remote and I'm unable : > > to test whether the USB keyboard and keystroke repetition works, but : > > core dumps to a SATA disk are now as fast as they were before : > > r195960. Thanks. : > : > I finally got a chance to try a USB keyboard with ddb, and things did : > not go too well overall. While inside ddb, keystrokes were recognized : > properly and repetition worked too. But after exiting ddb, the : > keyboard wouldn't work - there wasn't any visible response to : > keystrokes. Also, I kept seeing the login prompt continually scroll : > up, as if someone was pressing repeatedly. It certainly : > wasn't me :-) : > : > Are you assuming that a user will not resume normal operation after : > entering the debugger? A panic/reboot isn't the only exit route from : > ddb..... : > : > Simple sequence of steps to reproduce problem: : > ctrl-alt-esc on the USB keyboard : > db> c : : This is like expected. : : Once paniced, USB operation is blocked on the USB controller which the : keyboard belongs to, because USB does not receive any polling-complete call, : so that it can clean up the state in the USB controller! This mainly has to do : with avoid calling wakeup() during polling. : : To avoid wakeup() calls, USB sets some bits, which must be cleared when : polling is complete, which is currently not done, because USB doesn't know : when polling is complete ... Polling isn't supposed to work like this... The rest of the system effects a poll without these side effects. Warner From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 06:57:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C2E106566C; Fri, 7 Aug 2009 06:57:50 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id E5F648FC1A; Fri, 7 Aug 2009 06:57:49 +0000 (UTC) Received: by pzk4 with SMTP id 4so2411072pzk.7 for ; Thu, 06 Aug 2009 23:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=RemPFONwts0S31AmGNxzip9fQngmAr05jqrFTFjZn1w=; b=jDlpbrxFxkwRr+cfD5D/1ifQIyO1ubIjGRfOueHkffx/zdm6BQaLhogiRSqlTFmb6w J+lIgM99GMDXq2DkGnxshoc0PP4eC18fJ8pfUHj15ylJ+EOGAb/CO+zqO5+kNohf5MEb YLzIrpcRPsIG1xwSXAhcIOlBzBY8zsNgyTNX8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=DLzEv2YdxnBigobXydgyybWk6Sc7OylIrREoHEpdrShHkkqjYAtgP+2KN6om08suzG cTD7fNV6q9E49VNTJiiPfAdn3V11+v/nx1kz2dZlJqxt2U4u/iZpEdMFxy3M2GFAc4Ab 4BUJMvNtGK6mDguCnrsAuWtg8t6PysKfMNnlc= Received: by 10.114.113.20 with SMTP id l20mr1150237wac.126.1249628269320; Thu, 06 Aug 2009 23:57:49 -0700 (PDT) Received: from doormat.home (c-76-126-210-244.hsd1.ca.comcast.net [76.126.210.244]) by mx.google.com with ESMTPS id j15sm1205033waf.16.2009.08.06.23.57.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Aug 2009 23:57:48 -0700 (PDT) Date: Thu, 6 Aug 2009 23:57:44 -0700 From: Navdeep Parhar To: Hans Petter Selasky Message-ID: <20090807065744.GA23942@doormat.home> Mail-Followup-To: Hans Petter Selasky , Bruce Evans , "M. Warner Losh" , rwatson@freebsd.org, alfred@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20090802192902.GS47463@elvis.mu.org> <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200908070830.47894.hselasky@c2i.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, Bruce Evans , svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 06:57:50 -0000 On Fri, Aug 07, 2009 at 08:30:45AM +0200, Hans Petter Selasky wrote: > On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > > >> See attached patch. Please test and report back. > > > > > > This patch fixes my problem. The machine is remote and I'm unable > > > to test whether the USB keyboard and keystroke repetition works, but > > > core dumps to a SATA disk are now as fast as they were before > > > r195960. Thanks. > > > > I finally got a chance to try a USB keyboard with ddb, and things did > > not go too well overall. While inside ddb, keystrokes were recognized > > properly and repetition worked too. But after exiting ddb, the > > keyboard wouldn't work - there wasn't any visible response to > > keystrokes. Also, I kept seeing the login prompt continually scroll > > up, as if someone was pressing repeatedly. It certainly > > wasn't me :-) > > > > Are you assuming that a user will not resume normal operation after > > entering the debugger? A panic/reboot isn't the only exit route from > > ddb..... > > > > Simple sequence of steps to reproduce problem: > > ctrl-alt-esc on the USB keyboard > > db> c > > This is like expected. > > Once paniced, USB operation is blocked on the USB controller which the > keyboard belongs to Note that I did not enter ddb on a panic. I entered it voluntarily to take a look at some things. After that I was hoping to continue with business as usual. > board belongs to, because USB does not receive any polling-complete > call, so that it can clean up the state in the USB controller! This > mainly has to do with avoid calling wakeup() during polling. > > To avoid wakeup() calls, USB sets some bits, which must be cleared when > polling is complete, which is currently not done, because USB doesn't know > when polling is complete ... ok. And my question, just like with the previous problem, is: Can something be done about it or are we expected to learn to live with this? All of this is much much better than having *no* USB keyboard with ddb, but there definitely are some kinks to be ironed out. Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 08:21:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03EE9106564A; Fri, 7 Aug 2009 08:21:10 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swipnet.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id D288D8FC1A; Fri, 7 Aug 2009 08:21:08 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GB8WYDQo1twA:10 a=Qa35spukGxu/rmuNTmr4yg==:17 a=fJXw1O_C3gCtFQkJGJ4A:9 a=vB2IEK6qc5T_zaEdKs_g4BaNnH4A:4 Received: from [85.19.72.137] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 550447654; Fri, 07 Aug 2009 10:21:07 +0200 From: Hans Petter Selasky To: Navdeep Parhar Date: Fri, 7 Aug 2009 10:21:07 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090802192902.GS47463@elvis.mu.org> <200908070830.47894.hselasky@c2i.net> <20090807065744.GA23942@doormat.home> In-Reply-To: <20090807065744.GA23942@doormat.home> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908071021.09234.hselasky@c2i.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, Bruce Evans , svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 08:21:10 -0000 On Friday 07 August 2009 08:57:44 Navdeep Parhar wrote: > ok. And my question, just like with the previous problem, is: Can > something be done about it or are we expected to learn to live with > this I will make a fix for this. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 09:24:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295E11065670; Fri, 7 Aug 2009 09:24:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id C63718FC0A; Fri, 7 Aug 2009 09:24:48 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GB8WYDQo1twA:10 a=Qa35spukGxu/rmuNTmr4yg==:17 a=8kQB0OdkAAAA:8 a=6I5d2MoRAAAA:8 a=P9TsVtavG146hPkgxBsA:9 a=9YxHO_mmqpWiG0jQdLAA:7 a=OrJ2ROVjZiQDnvDjYSlunmBUMKEA:4 a=9aOQ2cSd83gA:10 Received: from [85.19.72.137] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1190164305; Fri, 07 Aug 2009 11:24:46 +0200 From: Hans Petter Selasky To: "M. Warner Losh" Date: Fri, 7 Aug 2009 11:24:44 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> <20090807.005400.-1749708164.imp@bsdimp.com> In-Reply-To: <20090807.005400.-1749708164.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908071124.47955.hselasky@c2i.net> Cc: src-committers@freebsd.org, nparhar@gmail.com, svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, svn-src-head@freebsd.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 09:24:50 -0000 On Friday 07 August 2009 08:54:00 M. Warner Losh wrote: > In message: <200908070830.47894.hselasky@c2i.net> > > Hans Petter Selasky writes: > : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > : > >> See attached patch. Please test and report back. > : > > > : > > This patch fixes my problem. The machine is remote and I'm unable > : > > to test whether the USB keyboard and keystroke repetition works, but > : > > core dumps to a SATA disk are now as fast as they were before > : > > r195960. Thanks. > : > > : > I finally got a chance to try a USB keyboard with ddb, and things did > : > not go too well overall. While inside ddb, keystrokes were recognized > : > properly and repetition worked too. But after exiting ddb, the > : > keyboard wouldn't work - there wasn't any visible response to > : > keystrokes. Also, I kept seeing the login prompt continually scroll > : > up, as if someone was pressing repeatedly. It certainly > : > wasn't me :-) > : > > : > Are you assuming that a user will not resume normal operation after > : > entering the debugger? A panic/reboot isn't the only exit route from > : > ddb..... > : > > : > Simple sequence of steps to reproduce problem: > : > ctrl-alt-esc on the USB keyboard > : > db> c > : > : This is like expected. > : > : Once paniced, USB operation is blocked on the USB controller which the > : keyboard belongs to, because USB does not receive any polling-complete > : call, so that it can clean up the state in the USB controller! This > : mainly has to do with avoid calling wakeup() during polling. > : > : To avoid wakeup() calls, USB sets some bits, which must be cleared when > : polling is complete, which is currently not done, because USB doesn't > : know when polling is complete ... > > Polling isn't supposed to work like this... The rest of the system > effects a poll without these side effects. Please try the following patch and report back. There is some Giant fuzz which you can ignore. I will see if I can followup a patch against -current later today. http://perforce.freebsd.org/chv.cgi?CH=167084 --HPS From owner-svn-src-all@FreeBSD.ORG Fri Aug 7 09:56:21 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBF2106566B; Fri, 7 Aug 2009 09:56:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 5D8FC8FC15; Fri, 7 Aug 2009 09:56:21 +0000 (UTC) Received: from besplex.bde.org (c122-106-150-32.carlnfd1.nsw.optusnet.com.au [122.106.150.32]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n779u9G4010353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Aug 2009 19:56:11 +1000 Date: Fri, 7 Aug 2009 19:56:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "M. Warner Losh" In-Reply-To: <20090807.005400.-1749708164.imp@bsdimp.com> Message-ID: <20090807181536.P848@besplex.bde.org> References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> <20090807.005400.-1749708164.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, nparhar@gmail.com, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, hselasky@c2i.net, rwatson@FreeBSD.org, brde@optusnet.com.au, svn-src-head@FreeBSD.org Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 09:56:22 -0000 On Fri, 7 Aug 2009, M. Warner Losh wrote: > In message: <200908070830.47894.hselasky@c2i.net> > Hans Petter Selasky writes: > : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > : > ... > : > Simple sequence of steps to reproduce problem: > : > ctrl-alt-esc on the USB keyboard > : > db> c > : > : This is like expected. > : > : Once paniced, USB operation is blocked on the USB controller which the > : keyboard belongs to, because USB does not receive any polling-complete call, > : so that it can clean up the state in the USB controller! This mainly has to do > : with avoid calling wakeup() during polling. > : > : To avoid wakeup() calls, USB sets some bits, which must be cleared when > : polling is complete, which is currently not done, because USB doesn't know > : when polling is complete ... > > Polling isn't supposed to work like this... The rest of the system > effects a poll without these side effects. Yes, polling is complete when the call to the console driver i/o function returns, although this is broken as designed. It requires a full (enough) reentrant (enough) context switch and on every call to a console driver i/o function, with a full (enough) hardware initialization on entry and a switch back to the old context on return. But this is hard to implement for recalcitrant and/or complicated hardware, and it cannot work for the cn_checkc() i/o function (which is now usually misspelled cn_getc()), since switching the context back on return gives up control so other functions (typically interrupt handlers) may eat the console input. Only the sio console driver does it AFAIK. A non-broken design would involve calling a console driver open, close or ioctl function switch to and from console mode at suitable points. For ddb, the suitable points are on entry and exit from interactive mode, at most once each for every entry into ddb (not on every entry point since that would thrash the i/o subsystem unnecessarily for things like stepping to the next return instruction; unnecessary (and necessary) thrashing is most obvious if you have a correctly implemented video console driver which must switch the whole physical screen context unless console output uses a physically separate screen (not supported in FreeBSD). For other uses, the suitable points are unclear. Obviously, single printfs should be atomic, so the output part of the console should be switched to and from at most once per printf, and printf could do this easily, but that is not enough for printing long messages or even for short messages that are built up with multiple printfs. However, nothing better seems practical, since it would be a large burden for all code that wants to use a set of printfs to have to wrap the set with console driver open/close calls. Therefore, the open/close calls belong in printf right next to my uncommitted serialization for printfs. Serialization is closely related to reserving the console output device -- it would be a similarly too-large burden for all code that wants to use printf to have to wrap the printfs with serialization calls. Full context switches for console output (of a single physical screen) are only best for ddb, since for ordinary printfs you want to see the output, so putting it in an inactive virtual console is not so good, and putting it on a separate virtual console and switching to that is also not so good (the difference for ddb is mainly that it is natural to switch the console on entry to interactive mode so as to actually work on it). So non-ddb printf output should go to a virtual console (or just a buffer) even if the console driver doesn't support virtual consoles. printf already has some support for this (buffering so as to do the output later to ptys). The cn_dbctl() console entry point was designed to fix part of this problem, but it was only used by syscons and this use was removed after removing the (needed :-() calls to it. The problem is larger than I noticed when I designed it -- I thought that there was only a problem for ddb mode, and that ddb mode was handled better by requiring the console driver to be reentrant (reentrancy is best it it is possible and works -- the idea is to work in all states, and having open/close functions to switch the state gives even more states). However, problems for non-ddb mode became obvious when the multiple consoles support code was added -- it made the cn_getc() interface useless and the cn_checkc() interface primary, since all active consoles must be polled for input together, and problems for ddb mode would be obvious if syscons correctly context-switched the screen. cn_dbctl() should have been named cn_ioctl() for general ioctls, and it could be abused for open/close with less abuse than having separate open/close entry points, since the needed open/close functions are more like ioctls than userland open/close (since you already have descriptors and want to modify the state of the device). syscons's use of cn_dbctl was simply: - cn_dbctl passes TRUE on entry and FALSE on exit; these can be counted so as to implement full reentrancy, but syscons counts them only so as to avoid state changes except on entries that are not reentries. (Reentries are not supported by ddb so they shouldn't actually occur.) - on entry (not reentry), syscons just stops the screen timer, hides the mouse, unlocks vty switching, switches to vty0, forces an update of the physical screen - on entry (including reentry), syscons increments its private variable `debugger'. - `debugger' is used mainly to avoid abusing ddb's private variable db_active. Various operations that are invalid in ddb mode (not nearly all, and mainly ones involving the screen timer and calling wakeup()) are avoided when `debugger' is set. Now, db_active is replaced by kdb_active and it is abused a lot in other subsystems but not nearly enough here. syscons still uses `debugger', but `debugger' is never initialized (except statically to 0). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:37:10 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64DD4106567C; Mon, 3 Aug 2009 20:37:10 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id F3EC18FC18; Mon, 3 Aug 2009 20:37:09 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 34F9E6D418; Mon, 3 Aug 2009 20:37:09 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 10420844DC; Mon, 3 Aug 2009 22:37:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Sam Leffler References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> <4A773430.2050804@errno.com> Date: Mon, 03 Aug 2009 22:37:08 +0200 In-Reply-To: <4A773430.2050804@errno.com> (Sam Leffler's message of "Mon, 03 Aug 2009 12:02:08 -0700") Message-ID: <8663d463d7.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 07 Aug 2009 16:55:09 +0000 Cc: src-committers@FreeBSD.org, Bruce Evans , svn-src-all@FreeBSD.org, alfred@FreeBSD.org, Hans Petter Selasky , Robert Watson , nparhar@gmail.com, svn-src-head@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:37:11 -0000 Sam Leffler writes: > I think we are losing sight of the goal here. We are in a release > schedule and trying to find a minimal set of changes that resolves our > immediate need. Keyboard repeat is not required and unless there is > an obvious and immediate solution it should be considered AFTER the > release. Remember we are already behind schedule for 8.0. Hear, hear. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:48:22 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 848EE106564A; Mon, 3 Aug 2009 20:48:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4718FC15; Mon, 3 Aug 2009 20:48:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n73KkjAU031609; Mon, 3 Aug 2009 14:46:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 03 Aug 2009 14:45:15 -0600 (MDT) Message-Id: <20090803.144515.-924279425.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <8663d463d7.fsf@ds4.des.no> References: <4A773430.2050804@errno.com> <8663d463d7.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 07 Aug 2009 16:55:19 +0000 Cc: src-committers@FreeBSD.org, brde@optusnet.com.au, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, hselasky@c2i.net, rwatson@FreeBSD.org, nparhar@gmail.com, svn-src-head@FreeBSD.org, sam@errno.com Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:48:23 -0000 In message: <8663d463d7.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : Sam Leffler writes: : > I think we are losing sight of the goal here. We are in a release : > schedule and trying to find a minimal set of changes that resolves = our : > immediate need. Keyboard repeat is not required and unless there i= s : > an obvious and immediate solution it should be considered AFTER the= : > release. Remember we are already behind schedule for 8.0. : = : Hear, hear. Does the patch that Hans posted fit the bill? To my eye I think it does, but I've not tested to see if it works... Warner From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 20:49:18 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02FE106566C; Mon, 3 Aug 2009 20:49:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9198FC12; Mon, 3 Aug 2009 20:49:18 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C7C626D41E; Mon, 3 Aug 2009 20:49:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id AB16E844DC; Mon, 3 Aug 2009 22:49:17 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <4A773430.2050804@errno.com> <8663d463d7.fsf@ds4.des.no> <20090803.144515.-924279425.imp@bsdimp.com> Date: Mon, 03 Aug 2009 22:49:17 +0200 In-Reply-To: <20090803.144515.-924279425.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 03 Aug 2009 14:45:15 -0600 (MDT)") Message-ID: <86skg84o8i.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 07 Aug 2009 16:55:27 +0000 Cc: src-committers@FreeBSD.org, brde@optusnet.com.au, svn-src-all@FreeBSD.org, alfred@FreeBSD.org, hselasky@c2i.net, rwatson@FreeBSD.org, nparhar@gmail.com, svn-src-head@FreeBSD.org, sam@errno.com Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 20:49:19 -0000 "M. Warner Losh" writes: > Does the patch that Hans posted fit the bill? To my eye I think it > does, but I've not tested to see if it works... My point (and Sam's, I think) is simply: drop keyboard repeat support. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 21:09:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0394E10656D5; Mon, 3 Aug 2009 21:09:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id ADF768FC08; Mon, 3 Aug 2009 21:09:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n73L5nmq031970; Mon, 3 Aug 2009 15:05:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 03 Aug 2009 15:06:37 -0600 (MDT) Message-Id: <20090803.150637.-861030402.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86skg84o8i.fsf@ds4.des.no> References: <8663d463d7.fsf@ds4.des.no> <20090803.144515.-924279425.imp@bsdimp.com> <86skg84o8i.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 07 Aug 2009 16:55:39 +0000 Cc: src-committers@freebsd.org, brde@optusnet.com.au, svn-src-all@freebsd.org, alfred@freebsd.org, hselasky@c2i.net, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, sam@errno.com Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 21:09:26 -0000 In message: <86skg84o8i.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > Does the patch that Hans posted fit the bill? To my eye I think it= : > does, but I've not tested to see if it works... : = : My point (and Sam's, I think) is simply: drop keyboard repeat support= .= And my point is that we have a patch that will work now. We should go with it. If it turns out not to work, 86 repeat support. Warner