Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Apr 2021 07:49:15 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 7f676ba9c69c - stable/12 - Add sysctl debug.uma_reclaim
Message-ID:  <202104110749.13B7nFvb056050@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=7f676ba9c69c577255faf63b3dce711f1959b495

commit 7f676ba9c69c577255faf63b3dce711f1959b495
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-04-04 16:28:14 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-04-11 07:48:51 +0000

    Add sysctl debug.uma_reclaim
    
    (cherry picked from commit 89619b747bcff379dca98e975a98865a45366417)
---
 sys/vm/vm_kern.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 83d58a194f62..80e7dd3c823b 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -860,3 +860,21 @@ debug_vm_lowmem(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_debug, OID_AUTO, vm_lowmem,
     CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, 0, debug_vm_lowmem, "I",
     "set to trigger vm_lowmem event with given flags");
+
+static int
+debug_uma_reclaim(SYSCTL_HANDLER_ARGS)
+{
+	int error, i;
+
+	i = 0;
+	error = sysctl_handle_int(oidp, &i, 0, req);
+	if (error != 0)
+		return (error);
+	if (i != 0)
+		uma_reclaim();
+	return (0);
+}
+
+SYSCTL_PROC(_debug, OID_AUTO, uma_reclaim,
+    CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, 0, debug_uma_reclaim, "I",
+    "set to generate request to reclaim uma caches");



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