From nobody Thu Jan 13 18:49:08 2022 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 035091960094; Thu, 13 Jan 2022 18:49:17 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZYPR6z69z3kgv; Thu, 13 Jan 2022 18:49:15 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 20DIn8w9072670 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 13 Jan 2022 10:49:08 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 20DIn8L8072669; Thu, 13 Jan 2022 10:49:08 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 13 Jan 2022 10:49:08 -0800 From: Gleb Smirnoff To: "Kenneth D. Merry" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ca2a7262df5e - main - Free UMA zones when a pass(4) instance goes away. Message-ID: References: <202201131556.20DFud7f088871@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202201131556.20DFud7f088871@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4JZYPR6z69z3kgv X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org X-Spamd-Result: default: False [2.90 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[glebius]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_SPAM_LONG(1.00)[1.000]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Kenneth, On Thu, Jan 13, 2022 at 03:56:39PM +0000, Kenneth D. Merry wrote: K> commit ca2a7262df5ec5fd07d4ac61738947f48c9cd7f2 K> Author: Kenneth D. Merry K> AuthorDate: 2022-01-13 15:50:40 +0000 K> Commit: Kenneth D. Merry K> CommitDate: 2022-01-13 15:54:56 +0000 K> K> Free UMA zones when a pass(4) instance goes away. K> K> If the UMA zones are not freed, we get warnings about re-using the K> sysctl variables associated with the UMA zones, and we're leaking K> the other memory associated with the zone structures. e.g.: K> K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.size)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.flags)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size_max)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.name)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.rsize)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ppera)! K> sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ipers)! K> K> Also, correctly clear the PASS_FLAG_ZONE_INPROG flag in K> passcreatezone(). The way it was previously done, it would have K> had set the flag and cleared all other flags that were set at K> that point. Definitely not my area, but I wonder why would we create a zone per device? Why not a global zone in the driver? -- Gleb Smirnoff