Re: git: d9d5f2c042a5 - main - cpuset: add --count
Date: Sun, 05 Feb 2023 15:42:16 UTC
On 2/5/23, Alexey Dokuchaev <danfe@freebsd.org> wrote: > On Sat, Feb 04, 2023 at 05:51:27PM +0000, Mateusz Guzik wrote: >> commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 >> >> cpuset: add --count >> >> Can be used to count the number of hardware threads in the cpu set. >> >> For example: [...] >> >> The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus > > Speaking of these two, do we really need both, unless they are not > exactly the same? (They do seem so, though.) > They are not, cpuset grabs a pid argument, while nproc only works on itself. -- Mateusz Guzik <mjguzik gmail.com>