From nobody@FreeBSD.org  Sun Aug 17 23:00:24 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 57EDC1065679
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <mjguzik@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Unused variable `nosleepwithlocks' in sys/vm/uma_core.c
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         126609
>Category:       kern
>Synopsis:       [vm] [patch] Unused variable `nosleepwithlocks' in sys/vm/uma_core.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    antoine
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 17 23:10:01 UTC 2008
>Closed-Date:    Sat Jan 24 19:42:54 UTC 2009
>Last-Modified:  Sat Jan 24 19:42:54 UTC 2009
>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:
Responsible-Changed-From-To: freebsd-bugs->antoine 
Responsible-Changed-By: antoine 
Responsible-Changed-When: Mon Aug 18 16:25:53 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126609 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/126609: commit references a PR
Date: Sat, 23 Aug 2008 12:40:25 +0000 (UTC)

 antoine     2008-08-23 12:40:07 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/vm               uma_core.c 
   Log:
   SVN rev 182047 on 2008-08-23 12:40:07Z by antoine
   
   Remove unused variable nosleepwithlocks.
   
   PR:             126609
   Submitted by:   Mateusz Guzik
   MFC after:      1 month
   X-MFC:          to stable/7 only, this variable is still used in stable/6
   
   Revision  Changes    Path
   1.151     +0 -7      src/sys/vm/uma_core.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: antoine 
State-Changed-When: Sat Aug 23 12:52:06 UTC 2008 
State-Changed-Why:  
Patched in head. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126609 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/126609: commit references a PR
Date: Sat, 24 Jan 2009 19:22:19 +0000 (UTC)

 Author: antoine
 Date: Sat Jan 24 19:22:05 2009
 New Revision: 187674
 URL: http://svn.freebsd.org/changeset/base/187674
 
 Log:
   MFC r182047 to stable/7:
     Remove unused variable nosleepwithlocks.
   
     PR:             126609
     Submitted by:   Mateusz Guzik
     MFC after:      1 month
     X-MFC:          to stable/7 only, this variable is still used in stable/6
   Reviewed by:	rwatson
 
 Modified:
   stable/7/sys/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
   stable/7/sys/dev/ath/ath_hal/   (props changed)
   stable/7/sys/dev/cxgb/   (props changed)
   stable/7/sys/vm/uma_core.c
 
 Modified: stable/7/sys/vm/uma_core.c
 ==============================================================================
 --- stable/7/sys/vm/uma_core.c	Sat Jan 24 18:57:22 2009	(r187673)
 +++ stable/7/sys/vm/uma_core.c	Sat Jan 24 19:22:05 2009	(r187674)
 @@ -249,13 +249,6 @@ 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,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: antoine 
State-Changed-When: Sat Jan 24 19:41:58 UTC 2009 
State-Changed-Why:  
Patch committed in head and stable/7, thanks for the report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126609 
>Unformatted:
