From nobody Thu May 09 20:22:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vb3Mh6VZPz5KR9Q; Thu, 09 May 2024 20:22:08 +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 4Vb3Mh4LmGz4pfW; Thu, 9 May 2024 20:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715286128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mPeBiaC0dqKV8z8YRdKqpaSbsaQVBEcgpIgI2PXt1sI=; b=kblJuGUQQZWC8ogfKpbW+TrlI1wjL0k9w/Wl5FZ5TCnxS9buFVyKg5HEZB1imLFq1oRHV3 QgT4b5RWW6URfCoESGpkMJzhi889D/UcyPf/NDIpWPpoJEDC9eB/w7lV/+V6oL2WzJ3v0C rjNxrQtJMGfxOCzq3Y5pIMChEEqYi4xHridlrscZJ+MtVoKIZZtnlE3UGp9t7Qd3YKe2Ra sjmh3csgh7lUOScBMpf4Qy/kfxfr51Od2L6c+BGqvEgFvf5by1IVK+YDz3ZQekRwDFgnGq A/m/4xPY4OUHpmPj+/wqNy9E2N+bDiqa3D+TX7d4pqYsPHWFqYsytpkxUyqq1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715286128; a=rsa-sha256; cv=none; b=kvAKP0iWmLq+ERxSHT/j0ssjW8V2nDYRmW+WGn9Nkeo0bKb82NSokn1WBqMoX1VTCpFFyS zZetXp6w5tTou1yD8GO09xyNXrs2Ep1mWnm2avG/U1Coxe5wx0h47DVYNitQeLcCPCCbDI VrpzzRloodF5Vt0LvUs7hqMBu5PMUDDsf8lTpyP2jvovVB8n+psEsrjU1YGu7xg2fX3yzR RMFOBMbLzFb3aHezCQHW9+Bmhw7nw+n4nBilL+XBVOrPuaYUpAPPAHU3kUaPJu7MpYyVdJ Lt2l8zANW1Om5Jk38PX+3+Mo9OjElifqy+w7x7NfamXE/09eO+VR2cLodEnD4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715286128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mPeBiaC0dqKV8z8YRdKqpaSbsaQVBEcgpIgI2PXt1sI=; b=gJgBta50QywlcZXttnWtElLfhAGD0YDrKs2NyHWYljt0kqEyo4WgtlZuzz4QH1aOm1FbZx WPaNA///voKCQ2Tc79JAvvnWhtonQJTVatjK2txlIQUhH4bAkPC6Pvp7a+hgoRZQbDI+xD k3mYOwAOxptKIj7/Scw/qPXOPBGKQkC77xcgF8fK3iB0Zyr183TRfEhMKWq60ynTzZ4JVD ior3xzQwnaSjx+xMJydCXlo78+UqBDTNRuWhmxNf8wlhXYCUApU5Rn5mqpiB4hp5a1iqdj wk2z9+BEjTnNT/1PBbMt5ZIPnFbDYEfj5Nrf3+xPoJUr1jFa7eDy1T8XtWLdjg== 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 4Vb3Mh3zHQz1MxS; Thu, 9 May 2024 20:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 449KM8OG059155; Thu, 9 May 2024 20:22:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 449KM8AW059152; Thu, 9 May 2024 20:22:08 GMT (envelope-from git) Date: Thu, 9 May 2024 20:22:08 GMT Message-Id: <202405092022.449KM8AW059152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 0704823d1e31 - stable/14 - geli: add a read-only kern.geom.eli.use_uma_bytes sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0704823d1e319a6476ef05467abeceb0556a5ca7 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0704823d1e319a6476ef05467abeceb0556a5ca7 commit 0704823d1e319a6476ef05467abeceb0556a5ca7 Author: Alan Somers AuthorDate: 2024-04-22 18:03:40 +0000 Commit: Alan Somers CommitDate: 2024-05-09 20:20:16 +0000 geli: add a read-only kern.geom.eli.use_uma_bytes sysctl It reports the value of the g_eli_alloc_sz variable. Allocations of this size or less will use UMA. Larger allocations will use malloc. Since malloc is slower, it is useful for users to know this variable so they can avoid such allocations. For example, ZFS users can set vfs.zfs.vdev.aggregation_limit to this value. Sponsored by: Axcient Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D44904 (cherry picked from commit 3acf3feaa8c5b15e820e86c1526c9a97fc5ad247) --- sys/geom/eli/g_eli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 16b38e628e35..400734c10596 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -101,11 +101,13 @@ SYSCTL_BOOL(_kern_geom_eli, OID_AUTO, blocking_malloc, CTLFLAG_RWTUN, static bool g_eli_unmapped_io = true; SYSCTL_BOOL(_kern_geom_eli, OID_AUTO, unmapped_io, CTLFLAG_RDTUN, &g_eli_unmapped_io, 0, "Enable support for unmapped I/O"); +static int g_eli_alloc_sz; +SYSCTL_UINT(_kern_geom_eli, OID_AUTO, use_uma_bytes, CTLFLAG_RD, + &g_eli_alloc_sz, 0, "Use uma(9) for allocations of this size or smaller."); static struct sx g_eli_umalock; /* Controls changes to UMA zone. */ SX_SYSINIT(g_eli_umalock, &g_eli_umalock, "GELI UMA"); static uma_zone_t g_eli_uma = NULL; -static int g_eli_alloc_sz; static volatile int g_eli_umaoutstanding; static volatile int g_eli_devs;