Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2019 16:26:58 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348747 - head/sys/vm
Message-ID:  <201906061626.x56GQwR9076792@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jun  6 16:26:58 2019
New Revision: 348747
URL: https://svnweb.freebsd.org/changeset/base/348747

Log:
  Add sysctls for uma_kmem_{limit,total}.
  
  Reviewed by:	alc, dougm, kib
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D20514

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Thu Jun  6 16:23:44 2019	(r348746)
+++ head/sys/vm/uma_core.c	Thu Jun  6 16:26:58 2019	(r348747)
@@ -144,9 +144,16 @@ static int boot_pages;
 
 static struct sx uma_drain_lock;
 
-/* kmem soft limit. */
+/*
+ * kmem soft limit, initialized by uma_set_limit().  Ensure that early
+ * allocations don't trigger a wakeup of the reclaim thread.
+ */
 static unsigned long uma_kmem_limit = LONG_MAX;
+SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_limit, CTLFLAG_RD, &uma_kmem_limit, 0,
+    "UMA kernel memory soft limit");
 static unsigned long uma_kmem_total;
+SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_total, CTLFLAG_RD, &uma_kmem_total, 0,
+    "UMA kernel memory usage");
 
 /* Is the VM done starting up? */
 static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906061626.x56GQwR9076792>