From nobody Wed Feb 15 07:45:17 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 4PGqr22Rbhz3rRr9 for ; Wed, 15 Feb 2023 07:45:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-20.consmr.mail.gq1.yahoo.com (sonic310-20.consmr.mail.gq1.yahoo.com [98.137.69.146]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGqr16bnvz3nk2 for ; Wed, 15 Feb 2023 07:45:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676447135; bh=FMT3eFS+4KM+C40qAAJttTrpCoKt+0Lb3Il6A12HN1I=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Hn+URmM8eOdK8aeXCxclqOtejUFvXU/sWDsJgHt4SbaHjDr/7qLJVHKuF4yNXkQFXLewLqaKa+CAUx+z1OtSvbCPJDSZQrbfST8V1A5gAxQsSYZg7wGjFwwVpINY0AktB2jEERTdthviaYCk1j2pW+e8yxHSKY6lvq9dAdZK5YyrIoktDnJXVxpFbaVcMPjUNmkzRKaFt+5yZrTbNzcJFmQxrhyypSU1I+rQu+NqzJOTVgdqlzxyquZ3bZoSJ1ovGPzXeqlZQ+qsT7bHVVRfd5MLkiKhVov4HhQs56WfEED+6B3TwIv7q7Vkp5KIw4YVs4lHJqONdbdhjRCh3hwjCA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676447135; bh=yt2G7oD5OUUKlF+VXgt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Y0VSQc8yCnyr_WjFaFAE Gg.ztLomtHJ6gfJZJbecLgBSHtDR01.fSsHgJavdRv..b8H66j6Hq7MYoRiAcTY8GnwGKZxCASuy ugssQHMf6lSqYqBu62hYVtmcpDDjgU2hW2T7oSw3rUjw3v.nFHKB1rvEuQJw1kw0TsAGwN4EZVIg Oe9AHhzwS_zWKiqXwrqIvh4maKDU6gxEG3I08HUxXPZF_lfaPxl7qcKyjEsPK9Cg8gDustmsgIiz rca7tOUL9ifXfvmxsas4CpI20f0qeveZa8Yj8JAKaj_lxWFEdo1AG6k38JV6sbtR32YknaxslqZM 4dcqXu44y4DGwvOxBrrH5aSH2pxmEdyp81d7pVao8orYNuPYmWXh4pqBllbo4o4scM9gDVeKm2Cu P2A030Krkxtb6pDLT4CaeRKAPX2fKGIDI9cR102J4EQEO_Cj4PQdQ3beqGA0diE6cH6YuDr6p9Hj v_dj75z7K_70s3KBLGvptXdESYc7Umg0pKUfdnHosvpe.OMPyCP9pmzuvFId.Ne753TrnhOjEVw8 ExjR0HnuNWaC4.98PMibuS1AP144N5USYUZB9NdgLMJXhzUk8WPmHMkPTZebejsf0HHhXfEPKC9c - X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Wed, 15 Feb 2023 07:45:35 +0000 Received: by hermes--production-ne1-746bc6c6c4-7ksjp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5bf78bc3ad6a4c8f4bfe54dc2c3fe5f9; Wed, 15 Feb 2023 07:45:29 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 \(3731.300.101.1.3\)) Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count [changed/broken command line parsing] From: Mark Millard In-Reply-To: Date: Tue, 14 Feb 2023 23:45:17 -0800 Cc: dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Mateusz Guzik X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Rspamd-Queue-Id: 4PGqr16bnvz3nk2 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Feb 14, 2023, at 23:08, Mateusz Guzik wrote: > On 2/15/23, Mark Millard wrote: >> Mateusz Guzik wrote on >> Date: Sat, 04 Feb 2023 17:51:27 UTC : >>=20 >>> The branch main has been updated by mjg: >>>=20 >>> URL: >>> = https://cgit.FreeBSD.org/src/commit/?id=3Dd9d5f2c042a51a9f0dd69eb1fc349efd= 81ffa483 >>>=20 >>> commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 >>> Author: Mateusz Guzik >>> AuthorDate: 2023-02-04 17:47:41 +0000 >>> Commit: Mateusz Guzik >>> CommitDate: 2023-02-04 17:50:41 +0000 >>>=20 >>> cpuset: add --count >>>=20 >>> Can be used to count the number of hardware threads in the cpu set. >>>=20 >>> For example: >>> $ cpuset -g -p $$ >>> pid 2440 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, = 16, >>> 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, = 34, >>> 35, 36, 37, 38, 39 >>> pid 2440 domain policy: first-touch mask: 0, 1 >>> $ cpuset -g --count -p $$ >>> 40 >>>=20 >>> 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. >>>=20 >>> Right now only -g -p combination is supported to reduce complexity. >>> As anything else errors out, this can be expanded later as needed. >>>=20 >>> Differential Revision: https://reviews.freebsd.org/D36351 >>=20 >> This broke long standing commands sequences in some makefiles >> that I use to build and run some benchmarks, the commands >> at issue involve use of cpuset. >>=20 >> However I can show the oddity in a much simpler context: >>=20 >> # cpuset echo "text" >> text >>=20 >> # cpuset echo "-text" >> usage: cpuset [-l cpu-list] [-n policy:domain-list] [-s setid] cmd = ... >> cpuset [-l cpu-list] [-n policy:domain-list] [-s setid] -p pid >> cpuset [-c] [-l cpu-list] [-n policy:domain-list] -C -p pid >> cpuset [-c] [-l cpu-list] [-n policy:domain-list] >> [-j jailid | -p pid | -t tid | -s setid | -x irq] >> cpuset -g [-cir] >> [-d domain | -j jailid | -p pid | -t tid | -s setid | -x = irq] >> cpuset -g --count -p pid >>=20 >>=20 >> By contrast, in my stable/13 context, so, showing the old behavior: >>=20 >> # cpuset echo "-text" >> -text FYI: the use of quotes was in my original text for other reasons. I should not have duplicated them into the above examples. (Same results without quotes.) > the idiomatic way to pass progs to spawn is to denote the end of any > opts with -- The cpuset man page gives no indication that it requires such notation. Programs with that requirement normally document it explicitly. (Programs that do not require the ntoation often allow the notation without documenting it.) There may be a consideration of how long it has allowed such a lack of use of "--" and how many things might break because it worked before. Lots of programs taking commands do not require such. For example: "time echo -text", "truss echo -text", and "ktrace echo -text". These have not and are not being changed to require such. They do allow the "--" notation. If it stays as it is, the change should probably be in UPDATING or other such place(s) that note where changes are required to keep things working. > so in particular you would: > cpuset -- echo -text Yep. > the fact that previous version worked without it is kind of a bug I disagree with that last statement, given the many programs that do not require such. Some programs have some specific notational complication lead to making it required. But, from what I've seen, most of the others do not make "--" required. =3D=3D=3D Mark Millard marklmi at yahoo.com