[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?
- Re: [PATCH] support for accessing CPU/core count (processor-count), (continued)
- Re: [PATCH] support for accessing CPU/core count (processor-count), Andreas Schwab, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Arthur Miller, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Andreas Schwab, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Arthur Miller, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Andreas Schwab, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Arthur Miller, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Stefan Monnier, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Arthur Miller, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Campbell Barton, 2021/10/10
- Re: [PATCH] support for accessing CPU/core count (processor-count), Arthur Miller, 2021/10/11
Re: [PATCH] support for accessing CPU/core count (processor-count),
Stefan Kangas <=
Re: [PATCH] support for accessing CPU/core count (processor-count), Andy Moreton, 2021/10/10
Re: [PATCH] support for accessing CPU/core count (processor-count), Stefan Kangas, 2021/10/10
Re: [PATCH] support for accessing CPU/core count (processor-count), Po Lu, 2021/10/10