[Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 20:05:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330
--- Comment #9 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #7)
Looking at the code that resulted is probably easier than
interpreting the bugzilla wording:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=97a912f7a832a662960749948049e15f3aecb2a7;hp=f787e138aa0bf677bf74fa2a08595c446292f3d7
shows:
__get_nprocs now first tries:
int result = read_sysfs_file ("/sys/devices/system/cpu/online");
__get_nprocs_conf now first tries:
int result = read_sysfs_file ("/sys/devices/system/cpu/possible");
It was __get_nprocs_conf that had the semantic change back to the
old way. __get_nprocs had stayed with /sys/devices/system/cpu/online
use in the first place.
For reference:
case _SC_NPROCESSORS_CONF:
return __get_nprocs_conf ();
case _SC_NPROCESSORS_ONLN:
return __get_nprocs ();
--
You are receiving this mail because:
You are the assignee for the bug.