diff options
author | green <green@FreeBSD.org> | 2004-07-19 15:05:24 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-07-19 15:05:24 +0000 |
commit | 3b66ac9138bbf0fa12b71d837e0efedb6f01f555 (patch) | |
tree | 86a5df002bd1e0a74757b118fdcdf9b1fc4d791a /sys/vm | |
parent | adcf12a12b0cb81643c76090b7c3bc8b9c73a7e9 (diff) | |
download | FreeBSD-src-3b66ac9138bbf0fa12b71d837e0efedb6f01f555.zip FreeBSD-src-3b66ac9138bbf0fa12b71d837e0efedb6f01f555.tar.gz |
Since breakage of malloc(9)/uma_zalloc(9) is totally non-optional in
GENERIC/for WITNESS users, make sure the sysctl to disable the behavior
is read-only and always enabled.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/uma_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 4b25a1b..6f6157f 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -224,9 +224,15 @@ void uma_print_zone(uma_zone_t); void uma_print_stats(void); static int sysctl_vm_zone(SYSCTL_HANDLER_ARGS); +#ifdef WITNESS +static int nosleepwithlocks = 1; +SYSCTL_INT(_debug, OID_AUTO, nosleepwithlocks, CTLFLAG_RD, &nosleepwithlocks, + 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths"); +#else 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"); +#endif SYSCTL_OID(_vm, OID_AUTO, zone, CTLTYPE_STRING|CTLFLAG_RD, NULL, 0, sysctl_vm_zone, "A", "Zone Info"); SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL); |