[Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330

--- Comment #8 from Jan Beich <[email protected]> ---
(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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.