Date: Sat, 27 Jun 2020 21:29:32 +0200 From: "Piotr P. Stefaniak" <pstef@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362705 - head/bin/ps Message-ID: <20200627192932.GA74062@freefall.freebsd.org> In-Reply-To: <20200627192102.GD32126@kib.kiev.ua> References: <202006271909.05RJ9Xae048991@repo.freebsd.org> <20200627192102.GD32126@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-06-27 22:21:02, Konstantin Belousov wrote: >On Sat, Jun 27, 2020 at 07:09:33PM +0000, Piotr Pawel Stefaniak wrote: >> Author: pstef >> @@ -1454,6 +1457,18 @@ pidmax_init(void) >> xo_warn("unable to read kern.pid_max"); >> pid_max = 99999; >> } >> +} >> + >> +static void >> +smp_init(void) >> +{ >> + size_t size; >> + >> + size = sizeof(smp); >> + if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && >There is no such sysctl machdep.smp_active, and it does not make sense to >call it (even if it existed in some ancient FreeBSD version, I am not sure). top(1) does that. >> + sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || >> + size != sizeof(smp)) >The indent on this and previous lines is wrong. > >> + smp = 0; >> } >That said, I do not see why do you need to check this kind of configuration >at all, on UP we return CPU 0 for all threads. I'll remove it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200627192932.GA74062>