From nobody Fri Dec 22 00:23:47 2023 X-Original-To: bugs@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 4Sx7M81tTdz54T8s for ; Fri, 22 Dec 2023 00:23:48 +0000 (UTC) (envelope-from bugzilla-noreply@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 4Sx7M80rLKz3D8K for ; Fri, 22 Dec 2023 00:23:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703204628; a=rsa-sha256; cv=none; b=mFhg5PifAGCz5suXQI8yWjVCaB/Dhvs8ZRHvASRiSROdBdzmHrq23xrySBl8IS4LiNA5Tt T6SkT8RgTeYaikteOTuG7LgN8XB1rC8GEAKGzRz6W22tF/gEx6yTPjU3+2gbFR6nHBhO5H IhfIny2K1Vt3JVVfgBTpR8usn35YNWkbC/dQR0YYKPcFgSkxNOVNUJvFdFn0wIJCHwHKsR a4If8OXUxtI/IczALvWa+zfoMOb7WSRU/mMDn0Bsav/rl/vsdJUszITQdeRPGK7bQAz+ZW XQI7D1FcqzbbLQPWxTB2eO1UX6J9nqlw+WBlVcVhZxpo+mCxr5pk/fnE0fdbCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703204628; 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: in-reply-to:in-reply-to:references:references; bh=qm6j7IuoTJ/pPJmYH0xFPr0UHDhMLZuIx7cEVzaG0LM=; b=G8DIXUlXSzYzwCcQfWz8RmwLf5EIZxD/e8Sgw61OS0nmrKwIOiszg9TxClz+D1DkBRvtN2 S1UIJ/3uVxPJj/VmRbHHXfQ9lKNEiu2MKRexL3EjAvGLMs8x0A+9rlriLVl1SxcSqeBZPa Jvs+djTHbh/vrYzvYmTXK+yAcexxSsAkODd1bkAU7i6d8Wdr+uZW/r60hNyDwRQC0IfO8p LamBDWd5CElQdD19edDADQoJFoXG3yYnx0YET4nPXpP+8gcHnLGYg/aamenYcfL3FcUgVl afiwnDSQsvMXhg72gAND+vDbKF5DLb/MrgS1FPegZBiY7kfKVj2vSySbKq2tcQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Sx7M76kmJzvHd for ; Fri, 22 Dec 2023 00:23:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3BM0NlmM050184 for ; Fri, 22 Dec 2023 00:23:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BM0NlFJ050183 for bugs@FreeBSD.org; Fri, 22 Dec 2023 00:23:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274316] excessive memory consumed by static_single_cpu_mask Date: Fri, 22 Dec 2023 00:23:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274316 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D488e8a7faca51a71987fbf00cd36cfcd1= 9269db7 commit 488e8a7faca51a71987fbf00cd36cfcd19269db7 Author: Bjoern A. Zeeb AuthorDate: 2023-10-23 23:14:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-12-22 00:22:04 +0000 LinuxKPI: reduce impact of large MAXCPU Start scaling arrays dynamically instead of using MAXCPU, resulting in extra allocations on startup but reducing the overall memory footprint. For the static single CPU mask we provide two versions to further save memory depending on a low or high CPU count system. The threshold to switch is currently at 128 CPUs on 64bit platforms. More detailed comments on the implementations can be found in the code. If I am not wrong on a MAXCPU=3D65536 system the memory footprint should roughly go down from 512M to 1.5M for the static single CPU mask. Submitted by: olce (most of this final version) Sponsored by: The FreeBSD Foundation PR: 274316 Differential Revision: https://reviews.freebsd.org/D42345 sys/compat/linuxkpi/common/include/asm/processor.h | 2 +- sys/compat/linuxkpi/common/src/linux_compat.c | 106 +++++++++++++++++= ++-- 2 files changed, 99 insertions(+), 9 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=