From 13d4ca14fadcd45661208bf36019aaa7a5f36cd4 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 12 Apr 2018 13:05:28 +0200 Subject: [PATCH] membarrier.2: Minor tweaks to Mathieu Desnoyers' patch Signed-off-by: Michael Kerrisk --- man2/membarrier.2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/man2/membarrier.2 b/man2/membarrier.2 index 3f4864b50..b3a94f95f 100644 --- a/man2/membarrier.2 +++ b/man2/membarrier.2 @@ -89,14 +89,14 @@ system call. All threads on the system are targeted by this command. .TP .BR MEMBARRIER_CMD_GLOBAL_EXPEDITED " (since Linux 4.16)" -Execute a memory barrier on all running threads of all processes which +Execute a memory barrier on all running threads of all processes that previously registered with .BR MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED . -Upon return from system call, the caller thread is ensured that all +Upon return from the system call, the calling thread is ensured that all running threads have passed through a state where all memory accesses to user-space addresses match program order between entry to and return from the system call (non-running threads are de facto in such a state). -This only covers threads from processes which registered with +This covers only threads from processes which registered with .BR MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED . Given that registration is about the intent to receive the barriers, it is valid to invoke @@ -107,7 +107,7 @@ The "expedited" commands complete faster than the non-expedited ones; they never block, but have the downside of causing extra overhead. .TP .BR MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED " (since Linux 4.16)" -Register the process intent to receive +Register the process's intent to receive .BR MEMBARRIER_CMD_GLOBAL_EXPEDITED memory barriers. .TP @@ -131,18 +131,18 @@ Register the process's intent to use .BR MEMBARRIER_CMD_PRIVATE_EXPEDITED . .TP .BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE " (since Linux 4.16)" -In addition to provide memory ordering guarantees described in +In addition to providing the memory ordering guarantees described in .BR MEMBARRIER_CMD_PRIVATE_EXPEDITED , -ensure the caller thread, upon return from system call, that all its +ensure the calling thread, upon return from system call, that all its running threads siblings have executed a core serializing instruction. -This only covers threads from the same process as the caller thread. +This only covers threads from the same process as the calling thread. The "expedited" commands complete faster than the non-expedited ones, they never block, but have the downside of causing extra overhead. A process needs to register its intent to use the private expedited sync core command prior to using it. .TP .BR MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE " (since Linux 4.16)" -Register the process intent to use +Register the process's intent to use .BR MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE . .TP .BR MEMBARRIER_CMD_SHARED " (since Linux 4.3)"