From nobody Thu Feb 16 18:01:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHjSJ3mjWz3rFgx for ; Thu, 16 Feb 2023 18:01:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHjSH1syxz4J6q for ; Thu, 16 Feb 2023 18:01:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f44.google.com with SMTP id f23-20020a05600c491700b003dff4480a17so4406017wmp.1 for ; Thu, 16 Feb 2023 10:01:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N3La6jg3tmlLrBdnmvlcc/v8VU0BaBUAk40M0XZAX40=; b=v4QCGCd/2+KZvbMicY75UKZ2BvjKl9UTQLxQqtdJIUHDEx1Tn1E4PhT9+q3Th6azsK zDa039077ZnV6pVktSLJwgYJ8el2DgZ4aOufFgCXu7N91dc3/08SGT+u/J7cza+tVX4M N6mnl59kQSgA2eu7JqXEUXCMy7u8FgoHlHRIHi3VYh2e10SVBalc8XENARHfeMQhYmq4 TcyPSJNyEKaUFNwnM+yDzKq4KvOGwm30KL97NJFoI2KCX9v1FkgCWf5dG2hsCJ+GnRIL tyVeKdCbnOhuvZr3ZS9ODgnQYliEPvyOMIVBPkTARNazJhNQRV5lrDsRIkbPRB7ceCRG C9eA== X-Gm-Message-State: AO0yUKUL7CZW93uK4R5q6nm5vyMqoKl8spb/FpfSVdVf+iVvRohCYO20 QdrxAYovk0DDRKv4PLtmt4jmcQ== X-Google-Smtp-Source: AK7set9bwvSrmWkQl5RgM03V/e7ZcEytZ7oZoOFe9/l2MPo9L6Qf0k4rUS25ZzJ3/7PkZm9CcMUJng== X-Received: by 2002:a05:600c:198a:b0:3e0:114:62ee with SMTP id t10-20020a05600c198a00b003e0011462eemr5569151wmq.8.1676570493993; Thu, 16 Feb 2023 10:01:33 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id k1-20020a7bc401000000b003dc47d458cdsm2417923wmi.15.2023.02.16.10.01.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2023 10:01:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count From: Jessica Clarke In-Reply-To: Date: Thu, 16 Feb 2023 18:01:32 +0000 Cc: Mateusz Guzik , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-2.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.44:from]; FREEFALL_USER(0.00)[jrtc27]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.44:from]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-Rspamd-Queue-Id: 4PHjSH1syxz4J6q X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On 5 Feb 2023, at 17:28, Alexey Dokuchaev wrote: >=20 > On Sun, Feb 05, 2023 at 04:42:16PM +0100, Mateusz Guzik wrote: >> On 2/5/23, Alexey Dokuchaev wrote: >>> On Sat, Feb 04, 2023 at 05:51:27PM +0000, Mateusz Guzik wrote: >>>> commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 >>>>=20 >>>> cpuset: add --count >>>>=20 >>>> Can be used to count the number of hardware threads in the cpu = set. >>>>=20 >>>> For example: [...] >>>>=20 >>>> The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus >>>=20 >>> Speaking of these two, do we really need both, unless they are not >>> exactly the same? (They do seem so, though.) >>=20 >> They are not, cpuset grabs a pid argument, while nproc only works on = itself. >=20 > cpuset? pid argument? But I was not asking about cpuset, I was = wondering > whether we need both of these sysctls: >=20 > $ sysctl hw.ncpu > hw.ncpu: 2 > $ sysctl kern.smp.cpus > kern.smp.cpus: 2 One prints mp_ncpus, the other smp_cpus. As far as I=E2=80=99m aware = those two are the same for as long as userspace is running, and only differ during early boot before AP bringup (mp_ncpus is how many it will bring up, and smp_cpus counts up as they come online until the two become equal). Jess