Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2023 20:05:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs
Message-ID:  <bug-230330-99-EqRxpwKmly@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 #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=3Dglibc.git;a=3Dcommitdiff;h=3D97a912f7a832a6=
62960749948049e15f3aecb2a7;hp=3Df787e138aa0bf677bf74fa2a08595c446292f3d7
shows:

__get_nprocs now first tries:

int result =3D read_sysfs_file ("/sys/devices/system/cpu/online");

__get_nprocs_conf now first tries:

int result =3D 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 ();

--=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-EqRxpwKmly>