Skip to contentSkip to conversation

Fix layout hiccup and typo in QQA

PATCH In review Akira Yokosawa 2 participants 6 messages Nov 5, 2017

lore
Share & tools
lore
#0 lore raw

cover Fix layout hiccup and typo in QQA

From 7902d9405a7e92aef281297af179c0696bc389b8 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 23:33:03 +0900
Subject: [PATCH 0/4] Fix layout hiccup and typo in QQA

Hi Paul,

There remain several hiccups and typos in Answers to Quick Quizzes. This patch set fixes them.

Patch #1 is actually a regression fix of my own. When I put a thin space before the "%", I removed the escape by accident. Patch #2 improves the layout of one-liner.
Patch #3 fixes remaining hiccups in QQA of whymb. Patch #4 fixes other trivial typos.

Thanks, Akira
--
Akira Yokosawa (4):
formal/regression: Restore escape to '%' symbol defer/seqlock: Use minipage and verbatim for one-liner in QQA appendix/whymb: Fix layout in answers to quick quizzes Fix typos in answers to quick quizzes

 appendix/toyrcu/toyrcu.tex           |  2 +-
 appendix/whymb/whymemorybarriers.tex |  4 ++--
 defer/seqlock.tex                    | 10 ++++++++--
 formal/regression.tex                |  2 +-
 memorder/memorder.tex                |  6 +++---
 toolsoftrade/toolsoftrade.tex        |  2 +-
 6 files changed, 16 insertions(+), 10 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/4 formal/regression: Restore escape to '%' symbol

From d785724bbefebe945e7d2003cd9bfd286f4872c8 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 18:28:41 +0900
Subject: [PATCH 1/4] formal/regression: Restore escape to '%' symbol

Fixes a7aaa45857bf ("formal, memorder: Fix typo and adjust spacing")
---
 formal/regression.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
formal/regression.tex +1 -1
index 89290ea..4e06cb7 100644
@@ -400,7 +400,7 @@ decreased the reliability of the overall software.
 \QuickQuizAnswer{
 	We don't, but it does not matter.
 
-	To see this, note that the 7\,% figure only applies to injected
+	To see this, note that the 7\,\% figure only applies to injected
 	bugs that were subsequently located: It necessarily ignores
 	any injected bugs that were never found.
 	Therefore, the MTBF statistics of known bugs is likely to be
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/4 defer/seqlock: Use minipage and verbatim for one-liner in QQA

In reply to Akira Yokosawa

From 17d998b15de3c1cd79073d5a255a06abeaee11d9 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 18:33:03 +0900
Subject: [PATCH 2/4] defer/seqlock: Use minipage and verbatim for one-liner in QQA

---
 defer/seqlock.tex | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
defer/seqlock.tex +8 -2
index e537628..421b3bd 100644
@@ -214,8 +214,14 @@ in other words, that there has been no writer, and returns true if so.
 	\co{smp_load_acquire()} instead of \co{READ_ONCE()}, which
 	in turn would allow the \co{smp_mb()} on line~17 to be dropped.
 	Similarly, line~41 could use an \co{smp_store_release()}, for
-	example, as follows: \\
-	\co{smp_store_release(&slp->seq, READ_ONCE(slp->seq) + 1);} \\
+	example, as follows:
+
+\begin{minipage}[c][5ex][c]{\columnwidth}\scriptsize
+\begin{verbatim}
+smp_store_release(&slp->seq, READ_ONCE(slp->seq) + 1);
+\end{verbatim}
+\end{minipage}
+
 	This would allow the \co{smp_mb()} on line~40 to be dropped.
 } \QuickQuizEnd
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/4 appendix/whymb: Fix layout in answers to quick quizzes

In reply to Akira Yokosawa

From 0cd6e0e44f5cc4be1b1a71caa04e2e9321b24c94 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 22:19:06 +0900
Subject: [PATCH 3/4] appendix/whymb: Fix layout in answers to quick quizzes

---
 appendix/whymb/whymemorybarriers.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
appendix/whymb/whymemorybarriers.tex +2 -2
index efd67c9..256b9af 100644
@@ -377,7 +377,8 @@ levels of the system architecture.
 	to the shared bus first,
 	and that CPU ``wins''.  The other CPU must invalidate its copy of the
 	cache line and transmit an ``invalidate acknowledge'' message
-	to the other CPU. \\
+	to the other CPU.
+
 	Of course, the losing CPU can be expected to immediately issue a
 	``read invalidate'' transaction, so the winning CPU's victory will
 	be quite ephemeral.
@@ -1525,7 +1526,6 @@ assert(r1 == 0 || a == 1);
 	No changes are needed to the code in the first two columns,
 	because interrupt handlers run atomically from the perspective
 	of the interrupted code.
-
 } \QuickQuizEnd
 
 \QuickQuiz{}
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/4 Fix typos in answers to quick quizzes

In reply to Akira Yokosawa

From 7902d9405a7e92aef281297af179c0696bc389b8 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 23:05:29 +0900
Subject: [PATCH 4/4] Fix typos in answers to quick quizzes

---
 appendix/toyrcu/toyrcu.tex    | 2 +-
 memorder/memorder.tex         | 6 +++---
 toolsoftrade/toolsoftrade.tex | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
appendix/toyrcu/toyrcu.tex +1 -1
index cd6541c..a796401 100644
@@ -1920,7 +1920,7 @@ certain types of library functions.
 	effect extended beyond the enclosing
 	\co{rcu_read_lock()} and \co{rcu_read_unlock()}, out to
 	the previous and next call to \co{rcu_quiescent_state()}.
-	This \co{rcu_quiescent_state} can be thought of as a
+	This \co{rcu_quiescent_state} can be thought of as an
 	\co{rcu_read_unlock()} immediately followed by an
 	\co{rcu_read_lock()}.
 
memorder/memorder.tex +3 -3
index 0e823d4..23638da 100644
@@ -608,7 +608,7 @@ are at most two threads involved.
 	reordered against later stores, which brings us to the remaining
 	rows in this table.
 
-	The \co{smp_mb())} row corresponds to the full memory barrier
+	The \co{smp_mb()} row corresponds to the full memory barrier
 	available on most platforms, with Itanium being the exception
 	that proves the rule.
 
@@ -1452,10 +1452,10 @@ dependent-load case.
 	address dependencies.
 	And this is why DEC Alpha requires the explicit memory barrier
 	supplied for it by the \co{lockless_dereference()} on line~21 of
-	Listings~\ref{lst:memorder:Enforced Ordering of Message-Passing Address-Dependency Litmus Test}.
+	Listing~\ref{lst:memorder:Enforced Ordering of Message-Passing Address-Dependency Litmus Test}.
 	However, DEC Alpha does track load-to-store address dependencies,
 	which is why line~20 of
-	Listings~\ref{lst:memorder:S Address-Dependency Litmus Test}
+	Listing~\ref{lst:memorder:S Address-Dependency Litmus Test}
 	does not have a \co{lockless_dereference()}.
 
 	To sum up, current platforms either respect address dependencies
toolsoftrade/toolsoftrade.tex +1 -1
index 7d3e038..771d8a9 100644
@@ -606,7 +606,7 @@ Listing~\ref{lst:toolsoftrade:Demonstration of Exclusive Locks}
 (\path{lock.c}).
 Line~1 defines and initializes a POSIX lock named \co{lock_a}, while
 line~2 similarly defines and initializes a lock named \co{lock_b}.
-Line~3 defines and initializes a shared variable ~\co{x}.
+Line~3 defines and initializes a shared variable~\co{x}.
 
 Lines~5-28 defines a function \co{lock_reader()} which repeatedly
 reads the shared variable \co{x} while holding
Signature · 1 line
2.7.4
#5 lore raw
In reply to Akira Yokosawa
Quoted 7 lines · Akira Yokosawa
Quoted 1 line

From 7902d9405a7e92aef281297af179c0696bc389b8 Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Nov 2017 23:33:03 +0900
Subject: [PATCH 0/4] Fix layout hiccup and typo in QQA

Hi Paul,

Quoted 8 lines

There remain several hiccups and typos in Answers to Quick Quizzes. This patch set fixes them.

Patch #1 is actually a regression fix of my own. When I put a thin space before the "%", I removed the escape by accident. Patch #2 improves the layout of one-liner.
Patch #3 fixes remaining hiccups in QQA of whymb. Patch #4 fixes other trivial typos.

Good eyes, applied, thank you! I am currently on a plane, so there may be some delay before these appear in the public perfbook repository.

Thanx, Paul

Quoted 19 lines

Thanks, Akira
--
Akira Yokosawa (4):
formal/regression: Restore escape to '%' symbol defer/seqlock: Use minipage and verbatim for one-liner in QQA appendix/whymb: Fix layout in answers to quick quizzes Fix typos in answers to quick quizzes

 appendix/toyrcu/toyrcu.tex           |  2 +-
 appendix/whymb/whymemorybarriers.tex |  4 ++--
 defer/seqlock.tex                    | 10 ++++++++--
 formal/regression.tex                |  2 +-
 memorder/memorder.tex                |  6 +++---
 toolsoftrade/toolsoftrade.tex        |  2 +-
 6 files changed, 16 insertions(+), 10 deletions(-)
Signature · 1 line
2.7.4