From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 17 23:10:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 101F31065683 for ; Sun, 17 Aug 2008 23:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DC1DF8FC15 for ; Sun, 17 Aug 2008 23:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7HNA1bG035918 for ; Sun, 17 Aug 2008 23:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7HNA1rg035917; Sun, 17 Aug 2008 23:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 17 Aug 2008 23:10:01 GMT Resent-Message-Id: <200808172310.m7HNA1rg035917@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mateusz Guzik Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57EDC1065679 for ; Sun, 17 Aug 2008 23:00:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 41A318FC17 for ; Sun, 17 Aug 2008 23:00:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7HN0OiO043863 for ; Sun, 17 Aug 2008 23:00:24 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m7HN0O3X043862; Sun, 17 Aug 2008 23:00:24 GMT (envelope-from nobody) Message-Id: <200808172300.m7HN0O3X043862@www.freebsd.org> Date: Sun, 17 Aug 2008 23:00:24 GMT From: Mateusz Guzik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/126609: [patch] Unused variable `nosleepwithlocks' in sys/vm/uma_core.c X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2008 23:10:02 -0000 >Number: 126609 >Category: kern >Synopsis: [patch] Unused variable `nosleepwithlocks' in sys/vm/uma_core.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 17 23:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Mateusz Guzik >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #10: Sun Aug 10 01:15:24 CEST 2008 root@eternal:/usr/obj/usr/src/sys/ETERNAL i386 >Description: Variable `nosleepwithlocks' is defined and controlled by sysctl debug.nosleepwithlocks, but not used. Support for it was removed in revision 1.142 -- from log message: Remove uma_zalloc_arg() hack, which coerced M_WAITOK to M_NOWAIT when allocations were made using improper flags in interrupt context. >How-To-Repeat: >Fix: Patch attached with submission follows: --- sys/vm/uma_core.c.orig 2008-08-18 00:30:29.000000000 +0200 +++ sys/vm/uma_core.c 2008-08-18 00:31:17.000000000 +0200 @@ -247,17 +247,10 @@ void uma_print_zone(uma_zone_t); void uma_print_stats(void); static int sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS); static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS); -#ifdef WITNESS -static int nosleepwithlocks = 1; -#else -static int nosleepwithlocks = 0; -#endif -SYSCTL_INT(_debug, OID_AUTO, nosleepwithlocks, CTLFLAG_RW, &nosleepwithlocks, - 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths"); SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL); SYSCTL_PROC(_vm, OID_AUTO, zone_count, CTLFLAG_RD|CTLTYPE_INT, 0, 0, sysctl_vm_zone_count, "I", "Number of UMA zones"); >Release-Note: >Audit-Trail: >Unformatted: