Date: Tue, 20 Aug 2013 11:06:57 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254558 - head/sys/kern Message-ID: <201308201106.r7KB6vB7067983@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Tue Aug 20 11:06:56 2013 New Revision: 254558 URL: http://svnweb.freebsd.org/changeset/base/254558 Log: Added sysctl to turn off calls to vmem_check(). Sponsored by: EMC / Isilon storage division Discussed with: jeff Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Tue Aug 20 07:48:20 2013 (r254557) +++ head/sys/kern/subr_vmem.c Tue Aug 20 11:06:56 2013 (r254558) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/smp.h> #include <sys/condvar.h> +#include <sys/sysctl.h> #include <sys/taskqueue.h> #include <sys/vmem.h> @@ -167,6 +168,9 @@ struct vmem_btag { #define BT_END(bt) ((bt)->bt_start + (bt)->bt_size - 1) #if defined(DIAGNOSTIC) +static int enable_vmem_check = 1; +SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RW, + &enable_vmem_check, 0, "Enable vmem check"); static void vmem_check(vmem_t *); #endif @@ -720,9 +724,11 @@ vmem_periodic(void *unused, int pending) LIST_FOREACH(vm, &vmem_list, vm_alllist) { #ifdef DIAGNOSTIC /* Convenient time to verify vmem state. */ - VMEM_LOCK(vm); - vmem_check(vm); - VMEM_UNLOCK(vm); + if (enable_vmem_check == 1) { + VMEM_LOCK(vm); + vmem_check(vm); + VMEM_UNLOCK(vm); + } #endif desired = 1 << flsl(vm->vm_nbusytag); desired = MIN(MAX(desired, VMEM_HASHSIZE_MIN),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308201106.r7KB6vB7067983>