NetBSD-Bugs archive

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

Re: kern/57816: Add sysctl support for physical cores



The following reply was made to PR kern/57816; it has been noted by GNATS.

From: Jason Bacon <jtocino%gmx.com@localhost>
To: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57816: Add sysctl support for physical cores
Date: Fri, 5 Jan 2024 08:05:49 -0600

 On 1/4/24 15:40, Michael van Elst wrote:
 > The following reply was made to PR kern/57816; it has been noted by GNAT=
 S.
 >
 > From: mlelstv%serpens.de@localhost (Michael van Elst)
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:
 > Subject: Re: kern/57816: Add sysctl support for physical cores
 > Date: Thu, 4 Jan 2024 21:36:04 -0000 (UTC)
 >
 >   jtocino%gmx.com@localhost (Jason Bacon) writes:
 >
 >   >I think it would be useful to have another variable for the number of
 >   >physical cores.  It could produce the same value as hw.ncpu on most
 >   >architectures, which don't have hyperthreading.
 >
 >   >Or, if there were a boolean to indicate whether hyperthreading is act=
 ive
 >   >(which would always be 0 on most architectures), it would be simple
 >   >enough to divide hw.ncpu by 2.
 >
 >   There are forms of "hyperthreading" where you have more than one
 >   thread per core and with recent CPU designs, you can even have
 >   different thread counts on each core.
 >
 >   A simple 'physical core count' isn't sufficient for anything.
 >
 
 A simple core count is sufficient for preventing oversubscription of
 cores, in order to maximize the speed of individual threads by
 eliminating a major source of contention.  This is the goal of most HPC
 resource managers, and of the py-joblib developers, which triggered this
 discussion (adding BSD support for auto-detection of available cores).
 


Home | Main Index | Thread Index | Old Index