From nobody Mon Apr 22 19:20:51 2024 X-Original-To: dev-commits-src-main@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 4VNZpq66Yhz5HjlN; Mon, 22 Apr 2024 19:20:51 +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 4VNZpq5B8Gz4hTr; Mon, 22 Apr 2024 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713813651; 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=Oy7GmpKHVv/WZjtrAs9yKa91Noka2RbEsEee6T6o7kc=; b=QNisBhG8aIT511sUcu7C8GVeNTg79YgTQCG+SNs00auKluJm1H0/TJtILtsisdLwvhKv2n JyTD6wejqYEvpzZk+eeYQzlH3Ws5Bf4WlTk0S2FBq1EAmHJpBaH7IIk3rt5+LXcolO72qL LALGvgRs0kU1JE0Qav94dAXBJ7wyzr/yvaNp+qG+yzUbu6Ivh81Dq3HD17y0I0ThRTPtaS BQA8iO65V9kUZM1MLEMukNGO+x7P/hzZ6/vEg/qN11oExwdEkdIinejrlEyDuN0NsvBJDs lhGxIga1A9VvWlS+XYToFw6WHeOyNwU4ppSF0+/+3tfG5lvY1QGkkZB/y0UmuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713813651; a=rsa-sha256; cv=none; b=Z7MFgtjZmf+oYhA9gcTPioPSrmJZPkLCKM9IECq8ym5YHRJdUry8Cp2sXdHu7UXRFxThWU szgwcqKTczh7WRptpiqy0RA7cn6CUhDVsXQmcE6oHGw6peJ8etL8urRiLR9CZTO4TVMhDn Q6P9YQNyXi9/88sdptVjf00Wc8xRH1UmEWcjR5ArYOPNXx51NgshmxCUA31Ltx89E77NEf bILKBPZWBzLXdrZc8bvoed0GeiHTbJTjGIrr5EiYgKrGgfe6vZjpqD90luqPzIfsI1caZZ hS9DM2A6VkhXXi9nGBu9ulFU95VEhvYaO9BwjPuKUhgOKfl/8g7tVSqewiZhlA== 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=1713813651; 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=Oy7GmpKHVv/WZjtrAs9yKa91Noka2RbEsEee6T6o7kc=; b=rmHANTy3KcutYI7VmosR18A/37dpUebnCZ5ys88PwSKqvYIuHkjOoaxRY779WloBxYt6YN +8ij7UahTaxAv1K4XU6oWp0SQ6q4s4gLUx2ujfHzxdicfPU+skOzXfvHZvRkRTN3Mt4MBL Df25BU5X+DO97DP5MueEy6UdrVaOEJ/FbNfpX5ULjIZ/gIJNAC15/3OBbDKd+OWYhR/p23 fk4wiFs/QN52F5caSGQ11An/UCUwFbRNQWpqODi5ErFiUDdXzjTl6IjLZ54kx3A5PYzvkO RGtTNyj4F5oOfW4Z4SsqJ1IxurVDDtUkmpfD0ZBko5V4OhJR1B4OsEIWgHpFrQ== 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 4VNZpq4nlmz11P6; Mon, 22 Apr 2024 19:20:51 +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 43MJKp9e091165; Mon, 22 Apr 2024 19:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MJKpTZ091162; Mon, 22 Apr 2024 19:20:51 GMT (envelope-from git) Date: Mon, 22 Apr 2024 19:20:51 GMT Message-Id: <202404221920.43MJKpTZ091162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 3acf3feaa8c5 - main - geli: add a read-only kern.geom.eli.use_uma_bytes sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 commit 3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 Author: Alan Somers AuthorDate: 2024-04-22 18:03:40 +0000 Commit: Alan Somers CommitDate: 2024-04-22 19:20:03 +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. MFC after: 1 week Sponsored by: Axcient Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D44904 --- 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 2bcd61f45640..5d769d606d20 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -100,11 +100,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;