From nobody Sun Feb 05 17:28:50 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 4P8xFZ2w21z3kcmg; Sun, 5 Feb 2023 17:28:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P8xFZ28Tfz44W5; Sun, 5 Feb 2023 17:28:50 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675618130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qIjNztKJXBP8ovnMJGWoThNRBT22wPiXROQYHCrL0Dc=; b=LiOFg5sPFwAzsqkBBFXa0DM1gUd0Wz3IjilgRWfj5dKZ53vbZNTiyofHjsYwJV6tAePwhw gvmaajf9RWCLJ82svG8hBze63yxbz9lpoJUZRBz04lN/MadxksGcYW8EGeVKk+H+rA70pe 4BQb/gEiIj3fpRQUsRrveQ4oQ4HdKcm7b92ZF4kCw2EPCUYv/kBJDicIBEDY7nG2z9Aluk zM0SdESlj3pxVYJonkBGvLfqdHRVTYYCZJ2xmCfp2sCn9CAynHyARKOPvXsGSZM8memD94 V4ODqiDzBhCyWgZCJvXzi751zgbCMJ/x8hr2nKpvSOtkG6HGhLoFo7bJrbwOUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675618130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qIjNztKJXBP8ovnMJGWoThNRBT22wPiXROQYHCrL0Dc=; b=sK1xEufDKdYR6HO9nwTU/CFlAnevZp465O1Gvmc51f57QdsSpLUFfBj5QOEBRtlC4hMaUh uGrvkcxQtIg05HGsCHuu7iZjlpD6kWS+IdUdAKW0i4Estp6uGWlHOXGPPFY2MLpDgiqPj6 wd/D5Pf3eZwJODkYXoTbjP8L3HZ/iGbCuZ1QJE6x2be+ctJ2WldWyg/++9aJDGwLC3lJ0/ Hl3z4JrHf5Pg7/Rh3Imd6A9pOFHaBwykQkp5qp7DyRQMuBAXkFnKkSrEf773EkUtRQCH/x hbwl27o7qU+gRoG6fTWDYXUkroiNSGgM/Eusoo9L23YBB+f3dG5AIn5OHPgDvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675618130; a=rsa-sha256; cv=none; b=dZA0W+SV1YkDHZ6ei5aKWjlzjtvaELId+sh8PrlSZ934oVaX6Jn4P+2IfORiwebuScVABd lcsDm1Xz9BZlj90LGjDUOuePS/+gHvc1L51KafB9YOIDj8f/Wr74kNBLEbE2v8NBjTOBZd RdjtF88nD5jzdyFiiJ0XLL5TvSWW9klDF5AiFMO3xRudiM/5ZRq7w0qRPtIR9jiVapcRkG WJWNPdMSNELf87ngsQ9OSqQIa2BYSmyAkhLkDLAjjLzBoj6uig6pyTyk+5bb/fWtRUUT8J Ua0yFhM8AqZltt+iSxd6gnN2i94LnwOxvqzmI6/ZKPun6uRS+60shCfuuId54g== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 21C0F1C1C4; Sun, 5 Feb 2023 17:28:50 +0000 (UTC) Date: Sun, 5 Feb 2023 17:28:50 +0000 From: Alexey Dokuchaev To: Mateusz Guzik 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: References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N 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 > >> > >> 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