linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>,
	Alejandro Colomar <alx.manpages@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	linux-man <linux-man@vger.kernel.org>
Subject: Re: [PATCH 1/1] rseq.2: New man page for the rseq(2) API
Date: Wed, 15 Feb 2023 12:12:52 -0500	[thread overview]
Message-ID: <f5f27a04-2541-9267-cefc-47fd1c656ca9@efficios.com> (raw)
In-Reply-To: <849b233c-b094-849d-a8fe-9b53cde33c80@efficios.com>

On 2023-02-15 12:09, Mathieu Desnoyers wrote:
> On 2023-02-14 20:20, G. Branden Robinson wrote:
[...]
>>
>>>> +user-space performs any side-effect
>>>> +(e.g. storing to memory).
>>>> +.IP
>>>> +This field is always guaranteed to hold a valid CPU number in the 
>>>> range
>>>> +[ 0 ..  nr_possible_cpus - 1 ].
>>>
>>> Please use interval notation:
>>>     [0, nr_possible_cpus)
>>> or
>>>     [0, nr_possible_cpus - 1]
>>> whichever looks better to you.
>>>
>>> We did some consistency fix recently:
>>> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=147a60d792a5db8f3cb93ea16eefb73e16c1fb91>
>>>
>>> Also, do we have a more standard way of saying nr_possible_cpus?
>>> Should we say nproc?
> 
> nproc(1) means:
> 
>         Print  the number of processing units available to the current
>         process, which may be less than the number of online processors
> 
> Which is the number of cpus currently available (AFAIU the result of the
> cpuset and sched affinity).
> 
> What I really mean here is the maximum value for possible cpus which can 
> be hotplugged into the system. So it's not the maximum number of 
> possible CPUs per se, but rather the maximum enabled bit in the possible 
> CPUs mask.
> 
> Note that we could express this differently as well: rather than saying 
> that it guarantees a value in the range [0, nr_possible_cpus - 1], we 
> could say that the values are guaranteed to be part of the possible cpus 
> mask, which would actually more accurate in case the possible cpus mask 
> has a hole (it tends to happen with things like lxc containers nowadays).
> 
> Do you agree that we should favor expressing this in terms of belonging 
> to the possible cpumask set rather than a range starting from 0 ?

Actually, the field may contain the value 0 even if 0 is not part of the 
possible cpumask. So forget what I just said about being guaranteed to 
be part of the possible cpus mask.

Thoughts ?

Thanks,

Mathieu

> 
> Thanks,
> 
> Mathieu
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


  reply	other threads:[~2023-02-15 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 19:54 [PATCH 1/1] rseq.2: New man page for the rseq(2) API Mathieu Desnoyers
2023-02-14 22:29 ` Alejandro Colomar
2023-02-15  1:20   ` G. Branden Robinson
2023-02-15  1:52     ` Alejandro Colomar
2023-02-15  2:21       ` G. Branden Robinson
2023-02-15  3:07         ` Alejandro Colomar
2023-02-15 16:44           ` Mathieu Desnoyers
2023-02-15 17:09     ` Mathieu Desnoyers
2023-02-15 17:12       ` Mathieu Desnoyers [this message]
2023-02-15 17:16       ` Alejandro Colomar
2023-02-15 18:58         ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5f27a04-2541-9267-cefc-47fd1c656ca9@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=alx.manpages@gmail.com \
    --cc=g.branden.robinson@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).