From nobody Thu Aug 3 21:46:10 2023 X-Original-To: dev-commits-src-main@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 4RH2Tv12frz4V3pt; Thu, 3 Aug 2023 21:46:11 +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 4RH2Tv0Clwz3YBP; Thu, 3 Aug 2023 21:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691099171; 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=68ZO0oImg7vwCGJfksOjjSIJUlDyjIe9hA20NgINqRc=; b=OVljv0nFOtWDnUDzdch6OgztwpP83mwAVuWXS+Aza2EH+tVINYKl/ojGf+Uur9kQ0Evdib LiiGja6LNMJ0f+5WhcyVD7N+9rkkTF3+RoITVS3fxtK16mTqSo6QDWZEV3qEQuUnMaduaf mQ6O9jtl1j4MsMCLOjNfQMQihGPl8dCa8jhs8+MdV09T0nuYAwIgo34mvf2UvBmLYD+j15 oIlh/Y4yO9qhhEWLTxryGNLp73FhWaSciB80XuO//qR51ZclCyoaHnALcv9P5keXG8+DTY V6fYrk4GirSW9/00wO9CvBxtjbkK4iCjD0OOSghhSVKf7+dY87eyQjfrtPWfBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691099171; 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=68ZO0oImg7vwCGJfksOjjSIJUlDyjIe9hA20NgINqRc=; b=GBQayO251csN2p9PFxmS6ObryexICqllnBvhSr84beczLj/3c5cfUkxCJbse37n9TRBshB y/eeFjM9Wn0Qq+alx2+ItOuV0IqjH6iFzlaPkc/QBYdkP1FSeyRgwrvvD6H4png1pDLMAk VtQpKYXOqUo0KBAnNi1HSBlXwOZAlHDUht6o/b6PNfgzIML0iDCz+XNlSSiI7X+dRhboSB h/ZLbOm7mj2NadghSBcLKBSAKp2XqdL5etLE9IvPZ047UuBalrEH53fC6SWbkdS6rvZCKt CWRcVPufZpSlrvwVpMybql7VLDhjV0fHTVFYQDD4QPCdY3+A3nxrGrv2uShu9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691099171; a=rsa-sha256; cv=none; b=NzhtcdbFlVpgT9z4LTEXIwQ3W1T334/CGeTAlBQr01UabhY+zMpZRx0rRQS7dYWX04hOQk f5RrM8lz8YaqAvM9yohWZsfVHCtYEQHFScIhabQMIil+WCth/wiBMRD1R642IsBxHwRqpU j1KTScFkt8Q3PwBqTPATl2rlWzACTeAkoD6JIp0IgwQch91gIan2bo+s9U/LI/5w8M8vUL hOjVlq79qL2qMYp3hUU6+IsUPByxEsyvNGrt30W737r4xuw7C5EzgNbd5Eo9XbZrGAvwkd BzVBWQ63oc6vYUusOPKGY81z//RpCWFGEk+Rz9IkRjUJk/41YqLsNx7NrQfgQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RH2Tt6MBjzd6C; Thu, 3 Aug 2023 21:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373LkA5T054896; Thu, 3 Aug 2023 21:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373LkA7i054895; Thu, 3 Aug 2023 21:46:10 GMT (envelope-from git) Date: Thu, 3 Aug 2023 21:46:10 GMT Message-Id: <202308032146.373LkA7i054895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9051987e40c5 - main - amd64: Bump MAXCPU to 1024 (from 256) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9051987e40c5a1f2396c5ceecff119fb4da28160 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9051987e40c5a1f2396c5ceecff119fb4da28160 commit 9051987e40c5a1f2396c5ceecff119fb4da28160 Author: Ed Maste AuthorDate: 2022-09-30 12:14:22 +0000 Commit: Ed Maste CommitDate: 2023-08-03 21:41:26 +0000 amd64: Bump MAXCPU to 1024 (from 256) Hardware with more than 256 CPU cores is currently available and will become increasingly common over FreeBSD 14's lifetime. Increase MAXCPU in the amd64 GENERIC kernel configuration to 1024. Earlier commits increased some related limits. These prerequisite commits include at least: - d7ed40243769 Increase MAX_APIC_ID safeguard to 0x800 - d1639e43c589 cpuset: increase userland maximum size to 1024 Global and allocated arrays sized by MAXCPU result in excessive bloat on systems with lower core counts. In addition, some code used u_char (8 bits) to hold a CPU index, which is not valid if MAXCPU is greater than 256. A number of recent commits addressed these sorts of issues, including at least: - 133935d26f20 pf: atomically increment state ids - 74ac712f72cf vmm: Dynamically allocate a couple of per-CPU state save areas - 78cfa762ebf2 callout: Move per-CPU callout state into the dpcpu region - 42f722e721cd amd64: store pcids pmap data in pcpu zone - 9801e7c275f6 smp_topo: dynamically allocate group array - 9fb6718d1b18 smp: Dynamically allocate the stoppcbs array - 2bb16c635249 x86: retire use of intr_bind There are some additional allocations still to be converted and more scalability work is required to make effective use of very high core count systems, but this change allows us to boot on these systems and provides a Kernel Binary Interface (KBI) for the FreeBSD 14 release that supports these configurations. Special thanks to AMD for providing hardware to test these changes. PR: 269572 Reviewed by: des Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36838 --- UPDATING | 4 ++++ sys/amd64/include/param.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 8e1b3e8555ba..5889c0ac9903 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20230803: + MAXCPU has been increased to 1024 in the amd64 GENERIC kernel config. + Out-of-tree kernel modules will need to be rebuilt. + 20230724: CAM has been mechanically updated s/u_int(64|32|16|8)_t/uint\1_t/g to move to the standard uintXX_t types from the old, traditional diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index a76be23bbe91..c7e5a5c7fc42 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -65,7 +65,7 @@ #ifdef SMP #ifndef MAXCPU -#define MAXCPU 256 +#define MAXCPU 1024 #endif #else #define MAXCPU 1