From nobody Thu Feb 16 18:01:32 2023 X-Original-To: dev-commits-src-all@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 4PHjSJ3yWJz3rFvG for ; Thu, 16 Feb 2023 18:01:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 4PHjSH4VjLz4HtR 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.52 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f52.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so2354243wms.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=yBFSlfMxUsZH6dTLUsTkDc9Z5/2k2go+fHGGmdVm4YcHphxcvFZbYU5BgFZ9PRdy5+ tZpyC1U0ekYLx+G5AmEQ5R4ziWBxowMTf82oCZ3eqt//9k/HqW278B580p6IUFlgSJsj zu28vYDsjgG8qYZj960HlWVjwBOtBV5z3dcrPmr6hra/xU3mCtSeB4rLgR0YXc5TF4YL imTAE5q6/bUD3s6surauuFHQ7WFiJHSTOlu3/J3W/f5UnxlIurqYZ/uwIcVqFYJCqTFo Y75wSD5y3gfjQq5BuCT6fSaqAnfOO6WKGMi4b34oLJKaqBqTI7uxMM9gYmG4YLV0c0oC LsAQ== X-Gm-Message-State: AO0yUKVUullSO9OkdzHAls0Hq3UPj8LjQ2I6F0WRoFtVj+EyWL1o+LaJ k5yt0Rj9U1y8Vsm0r0BWVXkY/A== 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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:c]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.52:from]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.52:from]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-Rspamd-Queue-Id: 4PHjSH4VjLz4HtR 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