Skip to contentSkip to conversation

SMPdesign: fixup trivial nitpicks

PATCH In review SeongJae Park 2 participants 4 messages Apr 26, 2016

lore
Share & tools
lore
#0 lore raw

cover SMPdesign: fixup trivial nitpicks

This patchset contains fixup of trivial nitpicks that found during translation of SMPdesign/ directory.

SeongJae Park (2):
SMPdesign: add missing tildes
SMPdesign: keep consistent expression

 SMPdesign/SMPdesign.tex     | 6 +++---
 SMPdesign/beyond.tex        | 6 ++++--
 SMPdesign/partexercises.tex | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 SMPdesign: add missing tildes

---
 SMPdesign/SMPdesign.tex     | 2 +-
 SMPdesign/partexercises.tex | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
SMPdesign/SMPdesign.tex +1 -1
index 72ea870..d2b092d 100644
@@ -954,7 +954,7 @@ We could simply assign each CPU one gigabyte of memory, and allow
 each CPU to access its own private chunk of memory, without the
 need for locking and its complexities and overheads.
 Unfortunately, this simple scheme breaks down if an algorithm happens
-to have CPU 0 allocate all of the memory and CPU 1 the free it, as
+to have CPU~0 allocate all of the memory and CPU~1 the free it, as
 would happen in a simple producer-consumer workload.
 
 The other extreme, code locking, suffers from excessive lock contention
SMPdesign/partexercises.tex +1 -1
index 5d46e70..8b3aa18 100644
@@ -597,7 +597,7 @@ and \co{pdeq_pop_r()} implementations separately.
 
 The \co{pdeq_pop_l()} implementation is shown on lines~1-16
 of the figure.
-Line 5 acquires the left-hand lock, which line~14 releases.
+Line~5 acquires the left-hand lock, which line~14 releases.
 Line~6 attempts to left-dequeue an element from the left-hand underlying
 double-ended queue, and, if successful, skips lines~8-13 to simply
 return this element.
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 SMPdesign: keep consistent expression

In reply to SeongJae Park

There are few inconsistent expressions for code / type mentioning and reference to figure / source file. This commit polishes the expressions to be more consistent with other expressions.

---
 SMPdesign/SMPdesign.tex | 4 ++--
 SMPdesign/beyond.tex    | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
SMPdesign/SMPdesign.tex +2 -2
index d2b092d..f609e7e 100644
@@ -991,11 +991,11 @@ Figure~\ref{fig:SMPdesign:Allocator-Cache Data Structures}.
 The ``Global Pool'' of Figure~\ref{fig:SMPdesign:Allocator Cache Schematic}
 is implemented by \co{globalmem} of type \co{struct globalmempool},
 and the two CPU pools by the per-CPU variable \co{percpumem} of
-type \co{percpumempool}.
+type \co{struct percpumempool}.
 Both of these data structures have arrays of pointers to blocks
 in their \co{pool} fields, which are filled from index zero upwards.
 Thus, if \co{globalmem.pool[3]} is \co{NULL}, then the remainder of
-the array from index 4 up must also be NULL.
+the array from index 4 up must also be \co{NULL}.
 The \co{cur} fields contain the index of the highest-numbered full
 element of the \co{pool} array, or -1 if all elements are empty.
 All elements from \co{globalmem.pool[0]} through
SMPdesign/beyond.tex +4 -2
index f4035cd..e52980b 100644
@@ -135,7 +135,8 @@ Line~20 initializes for the next pass through the outer loop.
 \end{figure}
 
 The pseudocode for \co{maze_try_visit_cell()} is shown on lines~1-12
-of Figure~\ref{fig:SMPdesign:SEQ Helper Pseudocode}.
+of Figure~\ref{fig:SMPdesign:SEQ Helper Pseudocode}
+(\co{maze.c}).
 Line~4 checks to see if cells \co{c} and \co{n} are adjacent and connected,
 while line~5 checks to see if cell \co{n} has not yet been visited.
 The \co{celladdr()} function returns the address of the specified cell.
@@ -146,7 +147,8 @@ is now full, and line~10 marks this cell as visited and also records
 the distance from the maze start.  Line~11 then returns success.
 
 The pseudocode for \co{maze_find_any_next_cell()} is shown on lines~14-28
-of the figure (\co{maze.c}).
+of Figure~\ref{fig:SMPdesign:SEQ Helper Pseudocode}
+(\co{maze.c}).
 Line~17 picks up the current cell's distance plus 1,
 while lines~19, 21, 23, and~25
 check the cell in each direction, and lines~20, 22, 24, and~26
Signature · 1 line
1.9.1
#3 lore raw
In reply to SeongJae Park
Quoted 2 lines · SeongJae Park

This patchset contains fixup of trivial nitpicks that found during translation of SMPdesign/ directory.

Good eyes, queued and pushed them both.

Thanx, Paul

Quoted 12 lines

SeongJae Park (2):
SMPdesign: add missing tildes
SMPdesign: keep consistent expression

 SMPdesign/SMPdesign.tex     | 6 +++---
 SMPdesign/beyond.tex        | 6 ++++--
 SMPdesign/partexercises.tex | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1