git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] thread-utils.c: detect online CPU count on OpenBSD / NetBSD

From
Collin Funk <collin.funk1@gmail.com>
Date
Jun 1, 2025, 02:14 UTC
Message-ID
<87msas5ht5.fsf@gmail.com>
In-Reply-To
<aB2c-W0V83aVDpZr@humpty.home.comstyle.com>
Hi Brad,
You wrote:
Show 9 quoted lines
> OpenBSD / NetBSD use HW_NCPUONLINE to detect the online CPU
> count. OpenBSD ships with SMT disabled on X86 systems so
> HW_NCPU would provide double the number of CPUs as opposed
> to the proper online count.
> 
> Signed-off-by: Brad Smith <brad@comstyle.com>
> ---
>  thread-utils.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
Looks good to me. I tested the patch on OpenBSD 7.7 and NetBSD 10.0.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Collin
Previous: Brad Smith
Message 4 of 4 in “thread-utils.c: detect online CPU count on OpenBSD / NetBSD”
  1. thread-utils.c: detect online CPU count on OpenBSD / NetBSDBrad Smith, May 9, 2025
  2. Patrick SteinhardtMay 9, 2025
  3. Brad SmithMay 31, 2025
  4. Collin FunkJun 1, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.