Skip to contentSkip to conversation

docs/memory-barriers: Apply missed changes

PATCH Applied SeongJae Park 2 participants 7 messages Aug 29, 2020 – Aug 31, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover docs/memory-barriers: Apply missed changes

From: SeongJae Park <[email protected]>

This patchset applies missed changes that should land in the memory-barriers.txt and its Korean translation.

The patches are based on v5.9-rc2.

Changes from v1
- Fix mismatch between author and Signed-off-by:

SeongJae Park (3):
docs/memory-barriers.txt: Fix references for DMA*.txt files docs/memory-barriers.txt/kokr: Remove remaining references to mmiowb() dics/memory-barriers.txt/kokr: Allow architecture to override the
flush barrier

 Documentation/memory-barriers.txt             |  8 ++---
 .../translations/ko_KR/memory-barriers.txt    | 32 ++++++++++++-------
 2 files changed, 24 insertions(+), 16 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/3 docs/memory-barriers.txt: Fix references for DMA*.txt files

From: SeongJae Park <[email protected]>

Commit 985098a05eee ("docs: fix references for DMA*.txt files") missed fixing memory-barriers.txt file. This commit applies the change to the file.

---
 Documentation/memory-barriers.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/memory-barriers.txt +4 -4
index 96186332e5f4..17c8e0c2deb4 100644
@@ -546,8 +546,8 @@ There are certain things that the Linux kernel memory barriers do not guarantee:
 	[*] For information on bus mastering DMA and coherency please read:
 
 	    Documentation/driver-api/pci/pci.rst
-	    Documentation/DMA-API-HOWTO.txt
-	    Documentation/DMA-API.txt
+	    Documentation/core-api/dma-api-howto.rst
+	    Documentation/core-api/dma-api.rst
 
 
 DATA DEPENDENCY BARRIERS (HISTORICAL)
@@ -1932,8 +1932,8 @@ There are some more advanced barrier functions:
      here.
 
      See the subsection "Kernel I/O barrier effects" for more information on
-     relaxed I/O accessors and the Documentation/DMA-API.txt file for more
-     information on consistent memory.
+     relaxed I/O accessors and the Documentation/core-api/dma-api.rst file for
+     more information on consistent memory.
 
  (*) pmem_wmb();
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/3 docs/memory-barriers.txt/kokr: Remove remaining references to mmiowb()

In reply to SeongJae Park

From: SeongJae Park <[email protected]>

Translate this commit to Korean:

a897b13d1b77 ("docs/memory-barriers.txt: Remove remaining references to mmiowb()")

---
 .../translations/ko_KR/memory-barriers.txt    | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
Documentation/translations/ko_KR/memory-barriers.txt +7 -12
index 9dcc7c9d52e6..291039d77694 100644
@@ -91,7 +91,6 @@ Documentation/memory-barriers.txt
 
      - 컴파일러 배리어.
      - CPU 메모리 배리어.
-     - MMIO 쓰기 배리어.
 
  (*) 암묵적 커널 메모리 배리어.
 
@@ -103,7 +102,6 @@ Documentation/memory-barriers.txt
  (*) CPU 간 ACQUIRING 배리어의 효과.
 
      - Acquire vs 메모리 액세스.
-     - Acquire vs I/O 액세스.
 
  (*) 메모리 배리어가 필요한 곳
 
@@ -515,14 +513,13 @@ CPU 에게 기대할 수 있는 최소한의 보장사항 몇가지가 있습니
      완료되기 전에 행해진 것처럼 보일 수 있습니다.
 
      ACQUIRE 와 RELEASE 오퍼레이션의 사용은 일반적으로 다른 메모리 배리어의
-     필요성을 없앱니다 (하지만 "MMIO 쓰기 배리어" 서브섹션에서 설명되는 예외를
-     알아두세요).  또한, RELEASE+ACQUIRE 조합은 범용 메모리 배리어처럼 동작할
-     것을 보장하지 -않습니다-.  하지만, 어떤 변수에 대한 RELEASE 오퍼레이션을
-     앞서는 메모리 액세스들의 수행 결과는 이 RELEASE 오퍼레이션을 뒤이어 같은
-     변수에 대해 수행된 ACQUIRE 오퍼레이션을 뒤따르는 메모리 액세스에는 보여질
-     것이 보장됩니다.  다르게 말하자면, 주어진 변수의 크리티컬 섹션에서는, 해당
-     변수에 대한 앞의 크리티컬 섹션에서의 모든 액세스들이 완료되었을 것을
-     보장합니다.
+     필요성을 없앱니다.  또한, RELEASE+ACQUIRE 조합은 범용 메모리 배리어처럼
+     동작할 것을 보장하지 -않습니다-.  하지만, 어떤 변수에 대한 RELEASE
+     오퍼레이션을 앞서는 메모리 액세스들의 수행 결과는 이 RELEASE 오퍼레이션을
+     뒤이어 같은 변수에 대해 수행된 ACQUIRE 오퍼레이션을 뒤따르는 메모리
+     액세스에는 보여질 것이 보장됩니다.  다르게 말하자면, 주어진 변수의
+     크리티컬 섹션에서는, 해당 변수에 대한 앞의 크리티컬 섹션에서의 모든
+     액세스들이 완료되었을 것을 보장합니다.
 
      즉, ACQUIRE 는 최소한의 "취득" 동작처럼, 그리고 RELEASE 는 최소한의 "공개"
      처럼 동작한다는 의미입니다.
@@ -1501,8 +1498,6 @@ u 로의 스토어를 cpu1() 의 v 로부터의 로드 뒤에 일어난 것으
 
   (*) CPU 메모리 배리어.
 
-  (*) MMIO 쓰기 배리어.
-
 
 컴파일러 배리어
 ---------------
Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 3/3 dics/memory-barriers.txt/kokr: Allow architecture to override the flush barrier

In reply to SeongJae Park

From: SeongJae Park <[email protected]>

Translate this commit to Korean:

3e79f082ebfc ("libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier")

---
 .../translations/ko_KR/memory-barriers.txt          | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/translations/ko_KR/memory-barriers.txt +13 -0
index 291039d77694..64d932f5dc77 100644
@@ -1904,6 +1904,19 @@ Mandatory 배리어들은 SMP 시스템에서도 UP 시스템에서도 SMP 효
      "커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을
      위해선 Documentation/core-api/dma-api.rst 문서를 참고하세요.
 
+ (*) pmem_wmb();
+
+     이것은 persistent memory 를 위한 것으로, persistent 저장소에 가해진 변경
+     사항이 플랫폼 연속성 도메인에 도달했을 것을 보장하기 위한 것입니다.
+
+     예를 들어, 임시적이지 않은 pmem 영역으로의 쓰기 후, 우리는 쓰기가 플랫폼
+     연속성 도메인에 도달했을 것을 보장하기 위해 pmem_wmb() 를 사용합니다.
+     이는 쓰기가 뒤따르는 instruction 들이 유발하는 어떠한 데이터 액세스나
+     데이터 전송의 시작 전에 persistent 저장소를 업데이트 했을 것을 보장합니다.
+     이는 wmb() 에 의해 이뤄지는 순서 규칙을 포함합니다.
+
+     Persistent memory 에서의 로드를 위해선 현재의 읽기 메모리 배리어로도 읽기
+     순서를 보장하는데 충분합니다.
 
 =========================
 암묵적 커널 메모리 배리어
Signature · 1 line
2.17.1
#4 lore raw

Re: [PATCH v2 3/3] dics/memory-barriers.txt/kokr: Allow architecture to override the flush barrier

Ah, why I always see the typo only after posting it... The title should start with 'docs/', not 'dics/'. Sorry, I will send a fixed patch as reply to this. If you want full v3 patchset, just let me know, please.

Thanks,
SeongJae Park

Quoted 38 lines · On Sat, 29 Aug 2020 10:26:07 +0200 SeongJae Park <[email protected]> wrote:

From: SeongJae Park <[email protected]>

Translate this commit to Korean:

3e79f082ebfc ("libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier")

---
 .../translations/ko_KR/memory-barriers.txt          | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/translations/ko_KR/memory-barriers.txt +13 -0
index 291039d77694..64d932f5dc77 100644
@@ -1904,6 +1904,19 @@ Mandatory 배리어들은 SMP 시스템에서도 UP 시스템에서도 SMP 효
      "커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을
      위해선 Documentation/core-api/dma-api.rst 문서를 참고하세요.
 
+ (*) pmem_wmb();
+
+     이것은 persistent memory 를 위한 것으로, persistent 저장소에 가해진 변경
+     사항이 플랫폼 연속성 도메인에 도달했을 것을 보장하기 위한 것입니다.
+
+     예를 들어, 임시적이지 않은 pmem 영역으로의 쓰기 후, 우리는 쓰기가 플랫폼
+     연속성 도메인에 도달했을 것을 보장하기 위해 pmem_wmb() 를 사용합니다.
+     이는 쓰기가 뒤따르는 instruction 들이 유발하는 어떠한 데이터 액세스나
+     데이터 전송의 시작 전에 persistent 저장소를 업데이트 했을 것을 보장합니다.
+     이는 wmb() 에 의해 이뤄지는 순서 규칙을 포함합니다.
+
+     Persistent memory 에서의 로드를 위해선 현재의 읽기 메모리 배리어로도 읽기
+     순서를 보장하는데 충분합니다.
 
 =========================
 암묵적 커널 메모리 배리어
Signature · 1 line
2.17.1
#5 lore raw

PATCH v3 3/3 docs/memory-barriers.txt/kokr: Allow architecture to override the flush barrier

From: SeongJae Park <[email protected]>

Translate this commit to Korean:

3e79f082ebfc ("libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier")

---
 .../translations/ko_KR/memory-barriers.txt          | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/translations/ko_KR/memory-barriers.txt +13 -0
index 291039d77694..64d932f5dc77 100644
@@ -1904,6 +1904,19 @@ Mandatory 배리어들은 SMP 시스템에서도 UP 시스템에서도 SMP 효
      "커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을
      위해선 Documentation/core-api/dma-api.rst 문서를 참고하세요.
 
+ (*) pmem_wmb();
+
+     이것은 persistent memory 를 위한 것으로, persistent 저장소에 가해진 변경
+     사항이 플랫폼 연속성 도메인에 도달했을 것을 보장하기 위한 것입니다.
+
+     예를 들어, 임시적이지 않은 pmem 영역으로의 쓰기 후, 우리는 쓰기가 플랫폼
+     연속성 도메인에 도달했을 것을 보장하기 위해 pmem_wmb() 를 사용합니다.
+     이는 쓰기가 뒤따르는 instruction 들이 유발하는 어떠한 데이터 액세스나
+     데이터 전송의 시작 전에 persistent 저장소를 업데이트 했을 것을 보장합니다.
+     이는 wmb() 에 의해 이뤄지는 순서 규칙을 포함합니다.
+
+     Persistent memory 에서의 로드를 위해선 현재의 읽기 메모리 배리어로도 읽기
+     순서를 보장하는데 충분합니다.
 
 =========================
 암묵적 커널 메모리 배리어
Signature · 1 line
2.17.1
maintainer Applied
#6 lore raw
In reply to SeongJae Park
Quoted 14 lines · On Sat, 29 Aug 2020 10:26:04 +0200 SeongJae Park <[email protected]> wrote:

This patchset applies missed changes that should land in the memory-barriers.txt and its Korean translation.

The patches are based on v5.9-rc2.

Changes from v1
- Fix mismatch between author and Signed-off-by:

SeongJae Park (3):
docs/memory-barriers.txt: Fix references for DMA*.txt files docs/memory-barriers.txt/kokr: Remove remaining references to mmiowb() dics/memory-barriers.txt/kokr: Allow architecture to override the
flush barrier

Quoted 3 lines
 Documentation/memory-barriers.txt             |  8 ++---
 .../translations/ko_KR/memory-barriers.txt    | 32 ++++++++++++-------
 2 files changed, 24 insertions(+), 16 deletions(-)

I've applied the set, thanks.

jon