From nobody Tue Jan 04 06:50:14 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 185FE19197B9; Tue, 4 Jan 2022 06:50:24 +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 4JSjt65fYcz4nS9; Tue, 4 Jan 2022 06:50:22 +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 2046oE5S033471 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Jan 2022 22:50:14 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 2046oENN033470; Mon, 3 Jan 2022 22:50:14 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 3 Jan 2022 22:50:14 -0800 From: Gleb Smirnoff To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fec8a8c7cbe4 - main - inpcb: use global UMA zones for protocols Message-ID: References: <202201031822.203IMxUF026349@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: <202201031822.203IMxUF026349@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4JSjt65fYcz4nS9 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.45 / 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)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_LONG(0.55)[0.548]; 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 On Mon, Jan 03, 2022 at 06:22:59PM +0000, Gleb Smirnoff wrote: T> The branch main has been updated by glebius: T> T> URL: https://cgit.FreeBSD.org/src/commit/?id=fec8a8c7cbe4384c7e61d376f3aa5be5ac895915 T> T> commit fec8a8c7cbe4384c7e61d376f3aa5be5ac895915 T> Author: Gleb Smirnoff T> AuthorDate: 2022-01-03 18:15:22 +0000 T> Commit: Gleb Smirnoff T> CommitDate: 2022-01-03 18:17:46 +0000 T> T> inpcb: use global UMA zones for protocols T> T> Provide structure inpcbstorage, that holds zones and lock names for T> a protocol. Initialize it with global protocol init using macro T> INPCBSTORAGE_DEFINE(). Then, at VNET protocol init supply it as T> the main argument to the in_pcbinfo_init(). Each VNET pcbinfo uses T> its private hash, but they all use same zone to allocate and SMR T> section to synchronize. T> T> Note: there is kern.ipc.maxsockets sysctl, which controls UMA limit T> on the socket zone, which was always global. Historically same T> maxsockets value is applied also to every PCB zone. Important fact: T> you can't create a pcb without a socket! A pcb may outlive its socket, T> however. Given that there are multiple protocols, and only one socket T> zone, the per pcb zone limits seem to have little value. Under very T> special conditions it may trigger a little bit earlier than socket zone T> limit, but in most setups the socket zone limit will be triggered T> earlier. When VIMAGE was added to the kernel PCB zones became per-VNET. T> This magnified existing disbalance further: now we have multiple pcb T> zones in multiple vnets limited to maxsockets, but every pcb requires a T> socket allocated from the global zone also limited by maxsockets. T> IMHO, this per pcb zone limit doesn't bring any value, so this patch T> drops it. If anybody explains value of this limit, it can be restored T> very easy - just 2 lines change to in_pcbstorage_init(). T> T> Differential revision: https://reviews.freebsd.org/D33542 This commit fired several tests failing: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/20277/ What happens here is that scapy would emit WARNINGs when it sees an interface without address. For example: >ifconfig epair create >python3.8 -c 'import scapy.all' WARNING: No IPv4 address found on epair7a ! WARNING: No IPv4 address found on epair7b ! WARNING: more No IPv4 address found on epair7a ! That would trigger atf failures, despite test case returns success. So, the real failure is not in the tests reported by job 20277, but in the previous ones, that leave orphaned epair interfaces. This is also associated with delayed jail destroy due to delayed memory reclamation in the pcb zone due to SMR. I'm working on the test suite to run clean. -- Gleb Smirnoff