kern/126609: [patch] Unused variable `nosleepwithlocks' in sys/vm/uma_core.c

Mateusz Guzik mjguzik at
Sun Aug 17 23:10:02 UTC 2008

>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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 17 23:10:01 UTC 2008
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #10: Sun Aug 10 01:15:24 CEST 2008     root at eternal:/usr/obj/usr/src/sys/ETERNAL  i386

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.


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;
-static int nosleepwithlocks = 0;
-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);
     0, 0, sysctl_vm_zone_count, "I", "Number of UMA zones");


More information about the freebsd-bugs mailing list