This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sysconf: Use conservative default for _SC_NPROCESSORS_ONLN [BZ #21542]
On Fri, Jun 9, 2017 at 5:28 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/09/2017 02:26 PM, H.J. Lu wrote:
>> On x86, we compute the number of threads which share L3
>> cache in a package via CPUID. We should use this info as
>> default on x86.
>
> That would only allow us to return a larger value than 2 in this case,
> wouldn't it?
>
> I don't know if the additional complexity is worth it. The 1/2
The information is there. We just need to store the result in
cpu_features and return it in __default_nprocs ().
> distinction is what patterns, I don't think it's possible to get this
> data reliably from CPUID.
No. Reliable data needs ACPI table.
--
H.J.