Re: git: d9d5f2c042a5 - main - cpuset: add --count
- In reply to: Jan Beich : "Re: git: d9d5f2c042a5 - main - cpuset: add --count"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Feb 2023 18:19:44 UTC
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>