Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 19:19:44 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Jan Beich <jbeich@freebsd.org>
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:  <CAGudoHGdWtjzvXQsOtjXn_Ksn8_Rs8-tLTKWdySavL-dH1G3LA@mail.gmail.com>
In-Reply-To: <h6vl-h50i-wny@FreeBSD.org>
References:  <202302041751.314HpRrn042970@gitrepo.freebsd.org> <h6vl-h50i-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/16/23, Jan Beich <jbeich@freebsd.org> wrote:
> Mateusz Guzik <mjg@FreeBSD.org> writes:
>
>> +.Pp
>> +The long options are as follows:
>> +.Bl -tag -width ".Fl -count"
>> +.It Fl -count
>> +Count the number of hardware threads included in the set. Requires
>> +.Fl g
>> +and
>> +.Fl p
>> +flags.
>> +.El
>
> --count appears to report total number of "hardware threads" instead of
> "included in the set". Is this intentional? If so the wording is confusing.
>
> $ cpuset -l 1 -- cpuset -g --count -p -1
> 8
> $ cpuset -l 1 -- cpuset -g -p -1
> pid -1 mask: 1
> pid -1 domain policy: first-touch mask: 0
> $ procstat cpuset $$
>   PID    TID COMM                TDNAME              CPU CSID CPU MASK
>  1111   7777 zsh                 -                    -1    1 0-7
>
> $ cpuset -l 1 yes >/dev/null &
> $ cpuset -g --count -p $(pgrep yes)
> 8
> $ cpuset -g -p $(pgrep yes)
> pid 2222 mask: 1
> pid 2222 domain policy: first-touch mask: 0
> $ procstat cpuset $(pgrep yes)
>   PID    TID COMM                TDNAME              CPU CSID CPU MASK
>  2222   8888 yes                 -                     1    3 1
>

that was a bug not worth fixing, so i whacked the feature:
https://cgit.freebsd.org/src/commit/?id=2924ae099a1e8ffc5b6040f3af5645aa54c0f629

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHGdWtjzvXQsOtjXn_Ksn8_Rs8-tLTKWdySavL-dH1G3LA>