Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 18:52:29 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Mateusz Guzik <mjg@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:  <h6vl-h50i-wny@FreeBSD.org>
In-Reply-To: <202302041751.314HpRrn042970@gitrepo.freebsd.org> (Mateusz Guzik's message of "Sat, 4 Feb 2023 17:51:27 GMT")
References:  <202302041751.314HpRrn042970@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?h6vl-h50i-wny>