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
Differential Revision: https://reviews.freebsd.org/D36679

(cherry picked from commit 8232a1eddadd6e70ce7bee085344b182517d44a7)

Details

Provenance
brooksAuthored on Sep 23 2022, 8:20 PM
Reviewer
cem
Differential Revision
D36679: cpuset(9): Refer to CPU_SETSIZE not MAXCPU
Parents
rG616b1b813891: Deprecate telnet daemon
Branches
Unknown
Tags
Unknown