public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: Peter Oskolkov <posk@google.com>,
	mtk.manpages@gmail.com,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-man@vger.kernel.org,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Boqun Feng <boqun.feng@gmail.com>, Paul Turner <pjt@google.com>,
	Chris Kennelly <ckennelly@google.com>,
	Peter Oskolkov <posk@posk.io>
Subject: Re: [PATCH] membarrier.2: Update membarrier manpage for 5.10
Date: Wed, 4 Nov 2020 10:39:55 +0100	[thread overview]
Message-ID: <315a032d-26e8-b6db-ec74-82ec8db37a4f@gmail.com> (raw)
In-Reply-To: <042cd0b4-236f-ceca-2760-9a4fbbcd3e3f@gmail.com>

Maybe I'd also add a paragraph in VERSIONS, saying there was an old 
version with a different prototype (and maybe show it there).

What do you think about it?

Thanks,

Alex

On 2020-11-03 22:01, Alejandro Colomar wrote:
> Hi Peter,
> 
> It looks very good! Just one typo:
> 
> [[
> .BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id );"
> ]]
> should be:
> [[
> .BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id );
> ]]
> 
> Note the removal of the last '"', which was unpaired.
> 
> 
> Thanks,
> 
> Alex
> 
> On 2020-11-03 20:04, Peter Oskolkov wrote:
>> Linux kernel commit 2a36ab717e8fe678d98f81c14a0b124712719840
>> (part of 5.10 release) changed sys_membarrier prototype/parameters
>> and added two new commands. This manpages patch reflects these
>> changes, by mostly copying comments from the kernel patch
>> into the manpage (I was also the author of the kernel change).
>> ---
>>   man2/membarrier.2 | 41 +++++++++++++++++++++++++++++++++++++++--
>>   1 file changed, 39 insertions(+), 2 deletions(-)
>>
>> diff --git a/man2/membarrier.2 b/man2/membarrier.2
>> index 3064b2d2e..c95e97cb6 100644
>> --- a/man2/membarrier.2
>> +++ b/man2/membarrier.2
>> @@ -30,7 +30,7 @@ membarrier \- issue memory barriers on a set of threads
>>   .PP
>>   .B #include <linux/membarrier.h>
>>   .PP
>> -.BI "int membarrier(int " cmd ", int " flags ");"
>> +.BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id 
>> );"
>>   .fi
>>   .PP
>>   .IR Note :
>> @@ -165,6 +165,29 @@ core command prior to using it.
>>   Register the process's intent to use
>>   .BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE .
>>   .TP
>> +.BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ " (since Linux 5.10)"
>> +Ensure the caller thread, upon return from system call, that all its
>> +running thread siblings have any currently running rseq critical 
>> sections
>> +restarted if
>> +.I flags
>> +parameter is 0; if
>> +.I flags
>> +parameter is
>> +.BR MEMBARRIER_CMD_FLAG_CPU ,
>> +then this operation is performed only on CPU indicated by
>> +.I cpu_id .
>> +This guarantee is provided only for threads in
>> +the same process as the calling thread.
>> +.IP
>> +RSEQ membarrier is only available in the "private expedited" form.
>> +.IP
>> +A process must register its intent to use the private expedited rseq
>> +command prior to using it.
>> +.TP
>> +.BR MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ " (since Linux 5.10)"
>> +Register the process's intent to use
>> +.BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ .
>> +.TP
>>   .BR MEMBARRIER_CMD_SHARED " (since Linux 4.3)"
>>   This is an alias for
>>   .BR MEMBARRIER_CMD_GLOBAL
>> @@ -172,7 +195,21 @@ that exists for header backward compatibility.
>>   .PP
>>   The
>>   .I flags
>> -argument is currently unused and must be specified as 0.
>> +argument must be specified as 0 unless the command is
>> +.BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ ,
>> +in which case
>> +.I flags
>> +can be either 0 or
>> +.BR MEMBARRIER_CMD_FLAG_CPU .
>> +.PP
>> +The
>> +.I cpu_id
>> +argument is ignored unless
>> +.I flags
>> +is
>> +.BR MEMBARRIER_CMD_FLAG_CPU ,
>> +in which case it must specify the CPU targeted by this membarrier
>> +command.
>>   .PP
>>   All memory accesses performed in program order from each targeted 
>> thread
>>   are guaranteed to be ordered with respect to
>>

  parent reply	other threads:[~2020-11-04  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 19:04 [PATCH] membarrier.2: Update membarrier manpage for 5.10 Peter Oskolkov
2020-11-03 21:01 ` Alejandro Colomar
2020-11-03 21:13   ` [PATCH 2/1] membarrier.2: Update EXAMPLES for new membarrier() API Alejandro Colomar
2020-11-04  9:39   ` Alejandro Colomar [this message]
2020-11-04 16:01     ` [PATCH] membarrier.2: Update membarrier manpage for 5.10 Peter Oskolkov
2020-11-04 16:29       ` [PATCH v3] membarrier.2: Update membarrier manual page " Alejandro Colomar
2020-11-04 16:42         ` Peter Oskolkov
2020-11-04 22:04           ` Alejandro Colomar
2020-11-05 11:32       ` [PATCH v4] " Alejandro Colomar
2020-11-05 12:04         ` Michael Kerrisk (man-pages)

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=315a032d-26e8-b6db-ec74-82ec8db37a4f@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=ckennelly@google.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mtk.manpages@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=posk@google.com \
    --cc=posk@posk.io \
    /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