Date: Tue, 14 Feb 2023 22:35:35 -0800 From: Mark Millard <marklmi@yahoo.com> To: "mjg@freebsd.org" <mjg@FreeBSD.org>, dev-commits-src-main@freebsd.org Subject: RE: git: d9d5f2c042a5 - main - cpuset: add --count [changed/broken command line parsing] Message-ID: <D2D940CD-B1A0-41B7-8C02-63CA63940525@yahoo.com> References: <D2D940CD-B1A0-41B7-8C02-63CA63940525.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mateusz Guzik <mjg_at_FreeBSD.org> wrote on Date: Sat, 04 Feb 2023 17:51:27 UTC : > 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 <mjg@FreeBSD.org> > AuthorDate: 2023-02-04 17:47:41 +0000 > Commit: Mateusz Guzik <mjg@FreeBSD.org> > 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 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. However I can show the oddity in a much simpler context: # cpuset echo "text" text # 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 By contrast, in my stable/13 context, so, showing the old behavior: # cpuset echo "-text" -text =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D2D940CD-B1A0-41B7-8C02-63CA63940525>