Skip to contentSkip to conversation

memorder: Reword 'memory-barrier shootdown' -> 'system-wide memory barrier'

PATCH In review Akira Yokosawa 2 participants 2 messages Dec 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memorder: Reword 'memory-barrier shootdown' -> 'system-wide memory barrier'

From 5b917177f7c6c3ee1678689a6c19c352f9f60ef5 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Mon, 14 Dec 2020 19:55:28 +0900
Subject: [PATCH -perfbook] memorder: Reword 'memory-barrier shootdown' -> 'system-wide memory barrier'

As Motohiro pointed out in his translation comment [1], memory barriers can not be shot down. Motohiro assumed that it was a typo of "cache-memory shootdown".

However, in this case, each CPU is only required to issue a memory- barrier instruction (to wait for ongoing cache activities to complete) in response to the IPI rather than to flush some cache memory.

This paragraph has since been updated to mention the sys_membarrier syscall added in Linux kernel v4.3 [2].

Let's borrow the term "system-wide memory barrier" from the commit log.

[1]: https://sites.google.com/view/kandamotohiro2/perfbook-d/perfbookappendixc
[2]: https://git.kernel.org/linus/5b25b13ab08f

---
 memorder/memorder.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
memorder/memorder.tex +1 -1
index 93d18dc5..28b5e433 100644
@@ -4070,7 +4070,7 @@ all reading CPUs to see the writing CPU's writes in order.
 This software barrier could be implemented by sending inter-processor
 interrupts (IPIs) to all other CPUs.
 Upon receipt of such an IPI, a CPU would execute a memory-barrier
-instruction, implementing a memory-barrier shootdown similar to that
+instruction, implementing a system-wide memory barrier similar to that
 provided by the Linux kernel's \co{sys_membarrier()} system call.
 Additional logic is required to avoid deadlocks.
 Of course, CPUs that respect data dependencies would define such a barrier
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Akira Yokosawa
Quoted 1 line

From 5b917177f7c6c3ee1678689a6c19c352f9f60ef5 Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Mon, 14 Dec 2020 19:55:28 +0900
Subject: [PATCH -perfbook] memorder: Reword 'memory-barrier shootdown' -> 'system-wide memory barrier'

As Motohiro pointed out in his translation comment [1], memory barriers can not be shot down. Motohiro assumed that it was a typo of "cache-memory shootdown".

Quoted 8 lines

However, in this case, each CPU is only required to issue a memory- barrier instruction (to wait for ongoing cache activities to complete) in response to the IPI rather than to flush some cache memory.

This paragraph has since been updated to mention the sys_membarrier syscall added in Linux kernel v4.3 [2].

Let's borrow the term "system-wide memory barrier" from the commit log.

That makes a lot of sense, so I have pull this in, and thank you both!

In case it helps in the future, the way to think of "shootdown" in the old context was that the code was using IPIs and memory barriers to "shoot down" any problematic misordering that might be happening on any of those CPUs.

But again, it makes a lot of sense to tie into the sys_membarrier() nomenclature, and again, thank you both!

Thanx, Paul

Quoted 25 lines

[1]: https://sites.google.com/view/kandamotohiro2/perfbook-d/perfbookappendixc
[2]: https://git.kernel.org/linus/5b25b13ab08f

---
 memorder/memorder.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
memorder/memorder.tex +1 -1
index 93d18dc5..28b5e433 100644
@@ -4070,7 +4070,7 @@ all reading CPUs to see the writing CPU's writes in order.
 This software barrier could be implemented by sending inter-processor
 interrupts (IPIs) to all other CPUs.
 Upon receipt of such an IPI, a CPU would execute a memory-barrier
-instruction, implementing a memory-barrier shootdown similar to that
+instruction, implementing a system-wide memory barrier similar to that
 provided by the Linux kernel's \co{sys_membarrier()} system call.
 Additional logic is required to avoid deadlocks.
 Of course, CPUs that respect data dependencies would define such a barrier
Signature · 1 line
2.17.1