[Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 08:55:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330 --- Comment #5 from Mark Millard <marklmi26-fbsd@yahoo.com> --- musl has _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF as synonyms, like FreeBSD --but both affinity based, unlike existing or proposed FreeBSD. glibc uses affinity as a 2nd fallback for both, not as the primary definition for either. (I'm unsure how the file-system-style data access it gives priority for each has its content controlled but the content for both paths seemed to be system-wide definitions.) So not synonyms when the primary definitions are used. Can be synonyms when fall backs are used. NetBSD does not use affinity for either. Not synonyms. OpenBSD avoids having affinity as I remember: so not affinity based. Not synonyms. I've not checked on Solaris. POSIX documentation for sysconf(name) indicates the interface is in general not intended to be what is used for things that change value during the process lifetime. Its rationale statement limits its intent to things set only at system initialization. (But _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF as names are not from/for POSIX.) This area is a mess: so many standards to choose from. No fixed alternative is generally compatible with the others. -- You are receiving this mail because: You are the assignee for the bug.