From owner-svn-src-head@freebsd.org Sat Jun 27 19:29:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B539235AA51; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vP2h4PQDz4MT7; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id 83639AF6D; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) Date: Sat, 27 Jun 2020 21:29:32 +0200 From: "Piotr P. Stefaniak" To: Konstantin Belousov 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> References: <202006271909.05RJ9Xae048991@repo.freebsd.org> <20200627192102.GD32126@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200627192102.GD32126@kib.kiev.ua> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:29:32 -0000 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.