From nobody Sat Feb 04 20:35:29 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 4P8Pnf42rDz3nr12; Sat, 4 Feb 2023 20:51:18 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P8Pnf1dqLz3jGH; Sat, 4 Feb 2023 20:51:18 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Sat, 04 Feb 2023 21:35:29 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso 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: <20230204203529.CusFt%steffen@sdaoden.eu> In-Reply-To: <202302041751.314HpRrn042970@gitrepo.freebsd.org> References: <202302041751.314HpRrn042970@gitrepo.freebsd.org> Mail-Followup-To: Mateusz Guzik , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-403-gdc9ff6b368 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4P8Pnf1dqLz3jGH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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 Mateusz Guzik wrote in <202302041751.314HpRrn042970@gitrepo.freebsd.org>: |The branch main has been updated by mjg: | |URL: https://cgit.FreeBSD.org/src/commit/?id=d9d5f2c042a51a9f0dd69eb1fc3\ |49efd81ffa483 | |commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 |Author: Mateusz Guzik |AuthorDate: 2023-02-04 17:47:41 +0000 |Commit: Mateusz Guzik |CommitDate: 2023-02-04 17:50:41 +0000 | | cpuset: add --count | | Can be used to count the number of hardware threads in the cpu set. ... | The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus \ | which | can be found in the tree, which are not adequate given existence of | cpusets. This is great (in respect to a #freebsd IRC from 2021-07-02)! Are there plans to address 19:26 < RhodiumToad> and in fact sysconf(_SC_NPROCESSORS_ONLN) is implemented as sysctl hw.ncpu or 19:25 < RhodiumToad> on fbsd 13 on a 4-cpu box, cpuset -l 0-1 getconf _NPROCESSORS_ONLN returns 4 rather than 2 or even add a shallow usr.bin/nproc(1) that does only this operation, as in Linux? (Or ln(1) it and check out argv[0] to do so?) Having a "portable" thing would be great. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)