emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] support for accessing CPU/core count (processor-count)


From: Omar Polo
Subject: Re: [PATCH] support for accessing CPU/core count (processor-count)
Date: Sun, 10 Oct 2021 18:03:10 +0200
User-agent: mu4e 1.6.6; emacs 28.0.50

Stefan Kangas <stefan@marxist.se> writes:

> Omar Polo <op@omarpolo.com> writes:
>
>> > +  mib[1] = HW_NCPU;
>>
>> at least on OpenBSD this should be HW_NCPUONLINE.
>>
>> OpenBSD disables hyperthreading by default so HW_NCPU is (almost) always
>> misleading.  For example, on my machine
>>
>>         % uname -a
>>         OpenBSD venera 7.0 GENERIC.MP#221 amd64
>>         % sysctl hw.ncpu
>>         hw.ncpu=8
>>         % sysctl hw.ncpuonline
>>         hw.ncpuonline=4
>>
>> and this has been the case for a while already (I mean, a couple of
>> years if not more.)
>
> BTW, Gnulib doesn't seem to make this distinction (lib/nproc.c:313).
> Maybe that should be reported to the Gnulib developers?

Thanks for letting me know, it looks wrong indeed.  I've never used
gnulib (directly at least) but I'll try to send a patch.

Thanks

Omar Polo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]