From owner-dev-commits-src-main@freebsd.org Fri Oct 1 17:31:29 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EC81C6B320A; Fri, 1 Oct 2021 17:31:29 +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 4HLcbj63Snz4mT2; Fri, 1 Oct 2021 17:31:29 +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 AFE882376B; Fri, 1 Oct 2021 17:31:29 +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 191HVTX5053546; Fri, 1 Oct 2021 17:31:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 191HVTTK053545; Fri, 1 Oct 2021 17:31:29 GMT (envelope-from git) Date: Fri, 1 Oct 2021 17:31:29 GMT Message-Id: <202110011731.191HVTTK053545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b984d153e057 - main - Don't set GELI UMA zone as UMA_ZONE_NOFREE. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b984d153e057b7879632b8e6015a05ce3f177580 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 17:31:30 -0000 The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b984d153e057b7879632b8e6015a05ce3f177580 commit b984d153e057b7879632b8e6015a05ce3f177580 Author: Gleb Smirnoff AuthorDate: 2021-10-01 17:24:50 +0000 Commit: Gleb Smirnoff CommitDate: 2021-10-01 17:31:17 +0000 Don't set GELI UMA zone as UMA_ZONE_NOFREE. That fixes memory leak on last GELI provider destroyed, introduced in 2dbc9a388ee. This patch was originally developed late 2019 and the flag was necessary to prevent zone drainage under memory pressure. Today, with f09cbea31a3f the UMA is fixed not to drain into reserves. Discussed with: jtl, markj Fixes: 2dbc9a388ee PR: 258787 --- sys/geom/eli/g_eli.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 773b9c829acc..c2fdb70980c0 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -892,13 +892,8 @@ g_eli_init_uma(void) G_ELI_AUTH_SECKEYLEN) * nsw_cluster_max + sizeof(uintptr_t), PAGE_SIZE); - /* - * Create the zone, setting UMA_ZONE_NOFREE so we won't - * drain the zone in a memory shortage. - */ g_eli_uma = uma_zcreate("GELI buffers", g_eli_alloc_sz, - NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* Reserve and pre-allocate pages, as appropriate. */ uma_zone_reserve(g_eli_uma, g_eli_minbufs);