HomeFreeBSD

amd64: Bump MAXCPU to 1024 (from 256)

Description

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:

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

Details

Provenance
emasteAuthored on Sep 30 2022, 12:14 PM
Reviewer
des
Differential Revision
D36838: amd64: Bump MAXCPU to 1024 (from 256)
Parents
rG7ff9ae90f0bd: iflib(9): Remove support for cloning pseudo interfaces
Branches
Unknown
Tags
Unknown