=== Increasing MAXCPU

Links: +
link:https://reviews.freebsd.org/D36838[Review D36838: amd64: Bump MAXCPU to 1024 (from 256)] URL: https://reviews.freebsd.org/D36838[]

Contact: Ed Maste <emaste@FreeBSD.org>

The default amd64 and arm64 FreeBSD kernel configurations currently support a maximum of 256 CPUs.
A custom kernel can be built with support for larger core counts by setting the `MAXCPU` kernel option.
However, commodity systems with more than 256 CPUs are becoming available and will be increasingly common during FreeBSD 14's support lifecycle.
We want to increase the default maximum CPU count to 1024 to support these systems "out of the box" on FreeBSD 14.

A number of changes have been made to support a larger default `MAXCPU`, including fixing the userland maximum for `cpuset_t` at 1024.
Changes have also been made to avoid static `MAXCPU`-sized arrays, replacing them with on-demand memory allocation.

Additional work is required to continue reducing static allocations sized by `MAXCPU` and addressing scalability bottlenecks on very high core count systems, but the goal is to release FreeBSD 14 with a stable ABI and KBI with support for large CPU counts.

Sponsor: The FreeBSD Foundation
