[Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 19:52:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 --- Comment #8 from Jan Beich <jbeich@FreeBSD.org> --- (In reply to Mark Millard from comment #5) > I've not checked on Solaris. Solaris appears to restrict _ONLN and _CONF by zone which is closer to *_getaffinity solution. https://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/syscall/sysconfig.c?r=440a8a36#107-111 Given Solaris uses a syscall glibc probably behaves the same under Linux-branded zones. I'm not familar with Solaris to find how it implements /sys/devices/system/cpu > But _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF as names are not from/for POSIX. I've linked a POSIX proposal in "See also" here. It has a suggestion to use "execution units" instead of "processors" and "available" instead of "online". One can't get more "execution units" than what cpuset/taskset or jail/zone/container has provided. -- You are receiving this mail because: You are the assignee for the bug.