Date: Sun, 5 Feb 2023 17:28:50 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Mateusz Guzik <mjguzik@gmail.com> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count Message-ID: <Y9/nUguGt6mlksGF@FreeBSD.org> In-Reply-To: <CAGudoHGn1-zZTAX4r1h_xMpaA4zd9b2y4_N21Jah1pdGsqsuQA@mail.gmail.com> References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> <Y98dOenW9mulqNzm@FreeBSD.org> <CAGudoHGn1-zZTAX4r1h_xMpaA4zd9b2y4_N21Jah1pdGsqsuQA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 05, 2023 at 04:42:16PM +0100, Mateusz Guzik wrote: > 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. cpuset? pid argument? But I was not asking about cpuset, I was wondering whether we need both of these sysctls: $ sysctl hw.ncpu hw.ncpu: 2 $ sysctl kern.smp.cpus kern.smp.cpus: 2 ./danfe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y9/nUguGt6mlksGF>