From nobody Fri Sep 30 02:04: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 4Mdtnq0R5dz4dfLt; Fri, 30 Sep 2022 02:04:15 +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 4Mdtnp3kfsz3fM8; Fri, 30 Sep 2022 02:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664503454; 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=+s14C+O1QRWwHs/R18UEUJQ0GFubowhVKU1AgWyJ9oA=; b=fJnjL7zj2r8bIFFi4DuPaV68I/LJgCxHp+Yy61/b3RMbUBYes3+VRwo3A7KoMIq+O/YQoh Kap3hWKHdXnaXVJdYAm0GyZ0f7y1Xt4f2/Ro+i2TfGhQnnGY3JOWDYiemQSafkTwQI9Oc3 d7iPmhN7SS9OD/BOMZa2TpW7JXllEdFR0GyU8uJnIfoMZ/8h2p+07RhKHNnktJIVlcvFBr 4VaGf/NnsEDdmIPdL2bbNFELY6n5i0uUx6Fzy6jvaI4BT718sBu9EA795/fAVDSlALr9UN dScdshg73V/ZyAdZwQx8OwrDxW4bkETXpaPssr6d242bQIX+dqsW6bFKNAxUxw== 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 4Mdtnp2qvrz11kq; Fri, 30 Sep 2022 02:04:14 +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 28U24EVt099216; Fri, 30 Sep 2022 02:04:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28U24E5x099215; Fri, 30 Sep 2022 02:04:14 GMT (envelope-from git) Date: Fri, 30 Sep 2022 02:04:14 GMT Message-Id: <202209300204.28U24E5x099215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 19a2e5ad5998 - stable/13 - jemalloc: use auxv ELF_BSDF_VMNOOVERCOMMIT instead of sysctl("vm.overcommit") 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19a2e5ad599895c422eaf458484044b904b99bbd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664503454; 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=+s14C+O1QRWwHs/R18UEUJQ0GFubowhVKU1AgWyJ9oA=; b=ValzaqkHduz+B4bddiY+yhFvMY8vJZDFowPxiigOopQGdd6SOqCKJskZOSXJ0kWVeIHRif ysG2uoIa/zmJ9GfeDJTCdflpvmQFiOqm3c9uL8KqTOyeIhVUiMs+4XTaHCM3xGbxqAdSZZ yZgPsHBGPqd6yLkDi1AxNWCcLMFnhoF49Nf3+A1zUMT7D8mhw34cNSVG8xrLDbbU0pKbBu f8+5T3AdBrLY+NrOpSJk6ZPZNh8PA6O/sUAkSZTm8jBFKducyB7Jqc74HAEsJgjD030dU8 D7r2ORz9oE+mHSSiexMihr5bxd+Hv7kNOx3PwwxSfSi6BKycgXjV3vhRclewMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664503454; a=rsa-sha256; cv=none; b=bNw7B5hnGAeg1RXBElejmXe+rLLKmnEjB3h7hjl7k3JE8s0cHr9ye4yU1zeU1aZoivc343 yhxKw/ezBh356x0YHChVXX3Bl7VBjmfBbt6ik4zS1V/5JMM9Hlb+W8zu9qWkCOThc6IO5H XAA8KUSDBn1VZO7YCMKnx9nsfk2BLeeC3L8MBH7ovz3z6DMMYnf8AaUbf68imiTMRCvr+F SQKmuVQDFrG2lDZJrSqdwdXHf8D2pG+i2M4xrNQgvBA2U7iS7T46b50rFai6dF+dDToCOF tazscfskAyH/iRCk44q9+5cXi3w7ezze4BuuUo/83wwjaBOFBCYSDYE99ZhZ9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=19a2e5ad599895c422eaf458484044b904b99bbd commit 19a2e5ad599895c422eaf458484044b904b99bbd Author: Konstantin Belousov AuthorDate: 2022-09-12 19:44:37 +0000 Commit: Konstantin Belousov CommitDate: 2022-09-30 00:29:10 +0000 jemalloc: use auxv ELF_BSDF_VMNOOVERCOMMIT instead of sysctl("vm.overcommit") (cherry picked from commit 0ae364adcd8d34bda3fe1a32e86025ba96df058a) --- contrib/jemalloc/src/pages.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c index 3600443e2cb5..6b00eb0cb919 100644 --- a/contrib/jemalloc/src/pages.c +++ b/contrib/jemalloc/src/pages.c @@ -11,6 +11,7 @@ #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT #include #ifdef __FreeBSD__ +#include #include #include #endif @@ -441,6 +442,13 @@ os_overcommits_sysctl(void) { int vm_overcommit; size_t sz; +#ifdef ELF_BSDF_VMNOOVERCOMMIT + int bsdflags; + + if (_elf_aux_info(AT_BSDFLAGS, &bsdflags, sizeof(bsdflags)) == 0) + return ((bsdflags & ELF_BSDF_VMNOOVERCOMMIT) == 0); +#endif + sz = sizeof(vm_overcommit); #if defined(__FreeBSD__) && defined(VM_OVERCOMMIT) int mib[2];