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: Stefan Kangas
Subject: Re: [PATCH] support for accessing CPU/core count (processor-count)
Date: Sun, 10 Oct 2021 14:21:32 +0200

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?



reply via email to

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