From nobody Wed Feb 15 07:08:48 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 4PGq1b2rtRz3rPWW for ; Wed, 15 Feb 2023 07:08:51 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 4PGq1b0h3Tz3kRQ for ; Wed, 15 Feb 2023 07:08:51 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-16ab8581837so21815414fac.4 for ; Tue, 14 Feb 2023 23:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=70mnbeQrIObF72Ptp8OmlyUJ+ouvrrWr5ILcFWgAk9A=; b=E2PovoAUzIPjgvPCTY1gfxhMYdkCLlshtlcIJr06eZjQXZ5+6J4l78PBMu5hARhkVL TujEHvIfktdPHSc1bj0oR90OuVKLZyDcQ0kx9GfVeCIpXH0W/m1Z8VJJncleOy/xoJ9d vp7nS9uVsCV8aeoUKm8UbgbhHP0Epr4Y0EeiC4fN15xTPXkw1L43o/bnl1Fj0qewbQFq BLSRH9idRyqzzDQsE72t31YwIetZslgKn0gKTYhAZp4Is/HrH1uLSx86V/xD5/8yaHX4 fj289rbJ5kurZsAYcgX+hLZVnkHhACs1oqblA0H9qsVOZl+9gZLor86gu7eaJgjyv6jL KyKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=70mnbeQrIObF72Ptp8OmlyUJ+ouvrrWr5ILcFWgAk9A=; b=jWMXdrl31pstTCwT4XcRbG5w56n1giw8FsTvthQqndQX6I1qaybEaeFPiv/rNC5HGg fv1yJAP5YvGK8laBPxEpzcW8AICFZJm/y7JwsXXuLEr1ijo7x5YZ4RgWyASlmbqu2IpX rJRUc4Km8m9p4XatXXqaUdaEKgNELrOn0PZqPYiQCVpCDBMUF6CoJj07OfAz0kEFapWq m0l701wZvu9dBTRSiV00pb96OaFjjVuVqIN6e0QDOWjYoseCt0SEXNl0ujDmojHoawdI 8SpYMNrIh9/x18ZUgjYQtjYJQD5q+0QIk8icaCqWCthdgpon4iUK/S97BO0fxR5jho1r QXdA== X-Gm-Message-State: AO0yUKU8IgejWq3asinG0p7lAPU2g03UqPtMPti9HhiY7/+uYaKgHX7A 2cQWblhgWS5QAsNM+Wk1wm7ktbj325xc5mpAHCk= X-Google-Smtp-Source: AK7set8qw9F1ASrZLUWoVe46eMqQJB2wKpN1A/8Aa0Cyfsku859c+FhUZSuc0urQ2QiRFKnz8sHRFjwUu1m+q+8XYz8= X-Received: by 2002:a05:6870:f907:b0:15f:1d8a:8860 with SMTP id ao7-20020a056870f90700b0015f1d8a8860mr138920oac.153.1676444929301; Tue, 14 Feb 2023 23:08:49 -0800 (PST) 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 Received: by 2002:a8a:1a0c:0:b0:49c:b071:b1e3 with HTTP; Tue, 14 Feb 2023 23:08:48 -0800 (PST) In-Reply-To: References: From: Mateusz Guzik Date: Wed, 15 Feb 2023 08:08:48 +0100 Message-ID: Subject: Re: git: d9d5f2c042a5 - main - cpuset: add --count [changed/broken command line parsing] To: Mark Millard Cc: dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4PGq1b0h3Tz3kRQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2/15/23, Mark Millard wrote: > Mateusz Guzik wrote on > Date: Sat, 04 Feb 2023 17:51:27 UTC : > >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483 >> >> 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. >> >> 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 >> >> 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. >> >> Right now only -g -p combination is supported to reduce complexity. >> As anything else errors out, this can be expanded later as needed. >> >> 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 > the idiomatic way to pass progs to spawn is to denote the end of any opts with -- so in particular you would: cpuset -- echo -text the fact that previous version worked without it is kind of a bug -- Mateusz Guzik