From nobody Fri Sep 16 20:25:35 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 4MTlv42Ff3z4d6p6; Fri, 16 Sep 2022 20:25:36 +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 4MTlv41fQMz3ML8; Fri, 16 Sep 2022 20:25:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663359936; 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=LcYUisuL1Cpl6NxKFXAsDdesL44w3s7esSkvLDOifCE=; b=HwGGhQ8bPCFFhTtMem63FfMdQktI4GHDISfxqjnzE8eFfwmYnuBNFRmjyAFLFYU5iQ/QgP ECHCwlp6ZSdTotMZU6kSckGucDUuBMN573HtiaSAVVniVQmIFC18akQ15l7NrjGkA8ne7k RdGUhmfkFZ9lr/R7UYZC1eEG+g4BKSsIg0bQ5aCOZP4mzsF82dk4jsNdn434OjPziBWkBh QOJG3/Qbo7kZWM8+a6benFXF3RcZLvyMxAqVR0aC/vy3aXxYMueAOoYDT4Z5FKvZkjHELE QrNlqhMvxBLsT30HUepGzGF72XP+a1NkfMW6u9xbFd5rrqjdFySRt6IJ+euTuA== 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 4MTlv40dFQzSyb; Fri, 16 Sep 2022 20:25:36 +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 28GKPZaG026268; Fri, 16 Sep 2022 20:25:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28GKPZ0G026267; Fri, 16 Sep 2022 20:25:35 GMT (envelope-from git) Date: Fri, 16 Sep 2022 20:25:35 GMT Message-Id: <202209162025.28GKPZ0G026267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 87384c51e047 - main - jemalloc: use symbolic definitions for bits in 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/main X-Git-Reftype: branch X-Git-Commit: 87384c51e047349fdbcf4f07fe52d900ce108040 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663359936; 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=LcYUisuL1Cpl6NxKFXAsDdesL44w3s7esSkvLDOifCE=; b=ZKgdW7Q3kEwYcsfEpp4sXqmb5SUdf6DBwD9upa1FBQPplgflEZL8tmTRQlx6G25zznJk66 +HpRcXKn3jxXU446XGmddQ2C2opMO7YMA2ZqDEk82FxmlRqPeQQ1LNH5kcf92WRjsGM7az 6R4VWATA5bIk8Yfsq9SoTIIHEvO99PXmXH3N5/A34eN7lOAWjJrkg92g+bNaSTSJxeSmFm AQmcQp+0KJgMZrreCjNvCjZTyaRTIahOCERoU9E+s+ij4z7HeT0BAtYKzyxXjwu/2c4DHG ZtZtvKIdmMD85QI49yJPux7R+dJkEKhDyGcBk4mqwcSOMfzURkc/klsn88WESw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663359936; a=rsa-sha256; cv=none; b=RaFnSd0US/JQXilYeJPJqB+nbKjeAL6QWFGslqfxTJbxv8v3OEAnfmSO+npQQK/+Nw9p7f f0gc5kxnq0eLrwhvxviiABbnGZrJlR8OYD15KlxNUWpZRsyAMMdiML2N4w9qU0lTjpj0Ex 8UDL+pBFMi9WXtn7ZU67oOKH5IVNmlPjiqMqjVqBuodDRxl5G3zx79kPs04ux+5cPOLPo9 WrPjrj90OJdDmXwMTwJJUJzpYJ7WzQe6z0/2EqSE1n29Ip8Hd0tCC0fVzEy3WABZvWyAAH GvOWXhiQq97D4X8ZRRzmRuNItBEdp9rEoxDmj9xidETmnffvHlOPrBc99JudGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=87384c51e047349fdbcf4f07fe52d900ce108040 commit 87384c51e047349fdbcf4f07fe52d900ce108040 Author: Konstantin Belousov AuthorDate: 2022-09-15 09:59:42 +0000 Commit: Konstantin Belousov CommitDate: 2022-09-16 20:23:19 +0000 jemalloc: use symbolic definitions for bits in vm_overcommit Reviewed by: brooks, imp (previous version) Discussed with: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D36540 --- contrib/jemalloc/src/pages.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c index 13de27a0087d..3600443e2cb5 100644 --- a/contrib/jemalloc/src/pages.c +++ b/contrib/jemalloc/src/pages.c @@ -12,6 +12,7 @@ #include #ifdef __FreeBSD__ #include +#include #endif #endif @@ -455,7 +456,10 @@ os_overcommits_sysctl(void) { } #endif - return ((vm_overcommit & 0x3) == 0); +#ifdef SWAP_RESERVE_FORCE_ON + return ((vm_overcommit & (SWAP_RESERVE_FORCE_ON | + SWAP_RESERVE_RLIMIT_ON)) == 0); +#endif } #endif