From nobody Fri Jun 17 19:41: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 B67CF85DD37; Fri, 17 Jun 2022 19:41: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 4LPqDJ15C7z3jH4; Fri, 17 Jun 2022 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494896; 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=HTJKvxmvp2j3rcOavHFbrfiq+SFpc2fluQTSnQ2intM=; b=C2CDWzlMJESvVEj4uclZM3CQ/X1O8ZLnuKWJ72+0B7oGTnqB2yblLruf4lHr94Uw99wyG4 VfgfYl/O1mEpLBIyuvsHfo9qXkNtgI/Xn23NwOCKkkLGaolo8+EEg+qHF7Nm5/KGdGdToC ekq4AW8IjQPvkQCUnlqoVCZGuNl+FL+2gTgRWAEsLTont+QHx9vklKQANyXImlbGmKzqEA 3peQ3STD1WKRAaAbqxYyCehCGdIsJyXnjaALxE6aTXWcpoQLaM3xn5PiRTG7O9jhJo2Yz0 nLqcDxH6tsz4MNleef414cHfBO41mlJabhIv5tKg+ze+h3ZvAhuUzbmi+OsvFQ== 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 52FEB25E0B; Fri, 17 Jun 2022 19:41:35 +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 25HJfZAK030665; Fri, 17 Jun 2022 19:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJfZY9030664; Fri, 17 Jun 2022 19:41:35 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:41:35 GMT Message-Id: <202206171941.25HJfZY9030664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: b3c809b96f77 - stable/13 - linprocfs: Add /proc/vm/max_map_count 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b3c809b96f778dad3c1b385d2f772c0944b8b47b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494896; 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=HTJKvxmvp2j3rcOavHFbrfiq+SFpc2fluQTSnQ2intM=; b=dDBsVeLlvSfAFo9rIO8bBP3VgFdrLjj9QnuM9lU0w3CAYiH4ANx/zYgZ3npAIoKCRPtWmo BAgzmqJywYUNYigasR6/VRgxqe/EmgCr/S3TlTKB9tVDN+NBnsivtrLOBXV9A7pqa8HrVa nBaH2vskn5b/VQ1XvVnuYDVwDJk5cap4R+2TIDb9NXnzuvXak3o82Oup9Ceqzf3kOk3b93 s5JrdjQeqHeJPoqH9fQBMPvGOiy3TZQadUB50MVdjHpSAmyZE6Nvwoj9yOl2LKKJNLbeJL QsQ9UHy+o79c0abBFxNYkrax4cKnX9a0+BR7OCKkKtUMoBZwbvh4yFFe2TE+wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494896; a=rsa-sha256; cv=none; b=eewRVdgnMN2oVCegLpK/9ZLkNavXEZ8jzAlyEuZ62M2uvthJfW2wAiamJ0tsFswQ1FWcUo PvYkxl4mV6VJ9Ti6JrJJATNb7bSxFJXfUPtWkXucu4LMzntKAyzU6GRTHzslZo1e+s0nRr heSBIQbNBX3zeRc/VjTkM+myU59pJaQZw9VwiGIka3bxfnZ554PqHNIROsE4UlHKgV6kKG wGykp8DX1cdyAtIVaf+P9o+JtVeiLmD+eKPU+ptuse3UpnSkcn8fNZCJ/Xw9+y4Yb8NGhE Or4mGTvWQDhNxGeriC8br/6ssU/QS1QluPgLnIfGykWDvXN089+8b965l1gN3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b3c809b96f778dad3c1b385d2f772c0944b8b47b commit b3c809b96f778dad3c1b385d2f772c0944b8b47b Author: Dmitry Chagin AuthorDate: 2022-05-31 08:42:06 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:41 +0000 linprocfs: Add /proc/vm/max_map_count On Linux this limits the number of maps per mm struct. We don't limit mappings, return a suitable large value. Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D35351 MFC after: 2 weeks (cherry picked from commit 7e2a451119373b7d3f2b3fd062d4ccb099dde022) --- sys/compat/linprocfs/linprocfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index e1cc3289ce99..6cf25350d9e8 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1978,6 +1978,21 @@ linprocfs_do_oom_score_adj(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/sys/vm/max_map_count + * + * Maximum number of active map areas, on Linux this limits the number + * of vmaps per mm struct. We don't limit mappings, return a suitable + * large value. + */ +static int +linprocfs_domax_map_cnt(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%d\n", INT32_MAX); + return (0); +} + /* * Constructor */ @@ -2122,6 +2137,8 @@ linprocfs_init(PFS_INIT_ARGS) dir = pfs_create_dir(sys, "vm", NULL, NULL, NULL, 0); pfs_create_file(dir, "min_free_kbytes", &linprocfs_dominfree, NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "max_map_count", &linprocfs_domax_map_cnt, + NULL, NULL, NULL, PFS_RD); return (0); }