From owner-dev-commits-src-branches@freebsd.org Sun Apr 11 07:49:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EE9D5E3BE3; Sun, 11 Apr 2021 07:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJ3sl6DNSz4swD; Sun, 11 Apr 2021 07:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7CD12026F; Sun, 11 Apr 2021 07:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13B7nFOM056051; Sun, 11 Apr 2021 07:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13B7nFvb056050; Sun, 11 Apr 2021 07:49:15 GMT (envelope-from git) Date: Sun, 11 Apr 2021 07:49:15 GMT Message-Id: <202104110749.13B7nFvb056050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7f676ba9c69c - stable/12 - Add sysctl debug.uma_reclaim MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7f676ba9c69c577255faf63b3dce711f1959b495 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2021 07:49:16 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7f676ba9c69c577255faf63b3dce711f1959b495 commit 7f676ba9c69c577255faf63b3dce711f1959b495 Author: Konstantin Belousov AuthorDate: 2021-04-04 16:28:14 +0000 Commit: Konstantin Belousov 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");