HomeFreeBSD

cpuset(9): Refer to CPU_SETSIZE not MAXCPU

Description

cpuset(9): Refer to CPU_SETSIZE not MAXCPU

The maximum CPU number of a cpuset_t is determined by CPU_SETSIZE. In
the kernel this is MAXCPU, but in userspace it is CPU_MAXSIZE unless
CPU_SETSIZE is defined before including sys/_cpuset.h. CPU_MAXSIZE is
256 and in userspace MAXCPU is generally 1 because it being set to a
larger MD value is gated on SMP being defined (not generally the case in
userspace).

Reported by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Reviewed by: cem, jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36679

Details

Provenance
brooksAuthored on Sep 23 2022, 8:20 PM
Reviewer
cem
Differential Revision
D36679: cpuset(9): Refer to CPU_SETSIZE not MAXCPU
Parents
rG62a7dae44dfb: release: Use standard mount points for arm MBR boot images
Branches
Unknown
Tags
Unknown