Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2023 19:52:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs
Message-ID:  <bug-230330-99-nNsNyCdgeJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-230330-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-230330-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230330

--- 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=3D440a8a36#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/f=
or 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 "onlin=
e".
One can't get more "execution units" than what cpuset/taskset or
jail/zone/container has provided.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230330-99-nNsNyCdgeJ>