Discussions of the Parallel Programming book
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -perfbook 01/11] appendix, glossary: Break and capitalize after colon
Date: Tue, 17 Aug 2021 19:16:34 +0900	[thread overview]
Message-ID: <825fec8b-9803-b9b0-dd3f-13eba2cfb0a1@gmail.com> (raw)
In-Reply-To: <9f71d7d5-b9bb-ceeb-6acb-e889821eeeb9@gmail.com>

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/questions/after.tex         |  2 +-
 appendix/toyrcu/toyrcu.tex           | 11 ++++++-----
 appendix/whymb/whymemorybarriers.tex | 24 ++++++++++++------------
 glossary.tex                         | 14 ++++++++------
 4 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/appendix/questions/after.tex b/appendix/questions/after.tex
index 195179d9..bd7c46b5 100644
--- a/appendix/questions/after.tex
+++ b/appendix/questions/after.tex
@@ -130,7 +130,7 @@ These locks cause the code segments in
 each other, in other words, to run atomically with respect to each other.
 This is represented in
 \cref{fig:app:questions:Effect of Locking on Snapshot Collection}:
-the locking prevents any of the boxes of code from overlapping in time, so
+The locking prevents any of the boxes of code from overlapping in time, so
 that the consumer's timestamp must be collected after the prior
 producer's timestamp.
 The segments of code in each box in this figure are termed
diff --git a/appendix/toyrcu/toyrcu.tex b/appendix/toyrcu/toyrcu.tex
index fd3f8c6d..b84755e3 100644
--- a/appendix/toyrcu/toyrcu.tex
+++ b/appendix/toyrcu/toyrcu.tex
@@ -533,8 +533,9 @@ checking of \co{rcu_refcnt}.
 	read-side critical section to see the recently removed
 	data element.
 
-	Exercise for the reader: use a tool such as Promela/spin
-	to determine which (if any) of the memory barriers in
+	Exercise for the reader:
+	Use a tool such as Promela/spin to determine which (if any) of
+	the memory barriers in
 	\cref{lst:app:toyrcu:RCU Update Using Global Reference-Count Pair}
 	are really needed.
 	See \cref{chp:Formal Verification}
@@ -590,9 +591,9 @@ checking of \co{rcu_refcnt}.
 		section was still referencing.
 	\end{sequence}
 
-	Exercise for the reader: What happens if \co{rcu_read_lock()}
-	is preempted for a very long time (hours!\@) just after
-	\clnref{r:lock:cur:b}?
+	Exercise for the reader:
+	What happens if \co{rcu_read_lock()} is preempted for a very long
+	time (hours!\@) just after \clnref{r:lock:cur:b}?
 	Does this implementation operate correctly in that case?
 	Why or why not?
 	The first correct and complete response will be credited.
diff --git a/appendix/whymb/whymemorybarriers.tex b/appendix/whymb/whymemorybarriers.tex
index c476730e..25d2c8f5 100644
--- a/appendix/whymb/whymemorybarriers.tex
+++ b/appendix/whymb/whymemorybarriers.tex
@@ -21,10 +21,10 @@ of how CPU caches work, and especially what is required to make
 caches really work well.
 The following sections:
 \begin{enumerate}
-\item	present the structure of a cache,
-\item	describe how cache-coherency protocols ensure that CPUs agree
+\item	Present the structure of a cache,
+\item	Describe how cache-coherency protocols ensure that CPUs agree
 	on the value of each location in memory, and, finally,
-\item	outline how store buffers and invalidate queues help
+\item	Outline how store buffers and invalidate queues help
 	caches and cache-coherency protocols achieve high performance.
 \end{enumerate}
 We will see that memory barriers are a necessary evil that is required
@@ -99,7 +99,8 @@ The size (32 cache lines in this case) and the
 this case) are collectively called the cache's
 ``\IXalt{geometry}{cache geometry}''.
 Since this cache is implemented in hardware, the hash function is
-extremely simple: extract four bits from the memory address.
+extremely simple:
+Extract four bits from the memory address.
 
 \begin{figure}
 \centering
@@ -385,11 +386,10 @@ levels of the system architecture.
 	What happens if two CPUs attempt to invalidate the
 	same cache line concurrently?
 }\QuickQuizAnswerB{
-	One of the CPUs gains access
-	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\@.
+	One of the CPUs gains access 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\@.
 
 	Of course, the losing CPU can be expected to immediately issue a
 	``read invalidate'' transaction, so the winning CPU's victory will
@@ -1436,9 +1436,9 @@ the assertion.
 	CPU~1's accesses, so the assertion could still fail.
 	However, all mainstream computer systems provide one mechanism
 	or another to provide ``transitivity'', which provides
-	intuitive causal ordering: if B saw the effects of A's accesses,
-	and C saw the effects of B's accesses, then C must also see
-	the effects of A's accesses.
+	intuitive causal ordering:
+	If B saw the effects of A's accesses, and C saw the effects of
+	B's accesses, then C must also see the effects of A's accesses.
 	In short, hardware designers have taken at least a little pity
 	on software developers.
 }\QuickQuizEnd
diff --git a/glossary.tex b/glossary.tex
index 60993be2..12dc7529 100644
--- a/glossary.tex
+++ b/glossary.tex
@@ -106,23 +106,25 @@
 	that CPU's cache.
 	The data might be missing because of a number of reasons,
 	including:
-	(1) this CPU has never accessed the data before
+	\begin{enumerate*}[(1)]
+	\item This CPU has never accessed the data before
 	(``startup'' or ``warmup'' miss),
-	(2) this CPU has recently accessed more
+	\item This CPU has recently accessed more
 	data than would fit in its cache, so that some of the older
 	data had to be removed (``capacity'' miss),
-	(3) this CPU
+	\item This CPU
 	has recently accessed more data in a given set\footnote{
 		In hardware-cache terminology, the word ``set''
 		is used in the same way that the word ``bucket''
 		is used when discussing software caches.}
 	than that set could hold (``associativity'' miss),
-	(4) some other CPU has written to the data (or some other
+	\item Some other CPU has written to the data (or some other
 	data in the same cache line) since this CPU has accessed it
 	(``communication miss''), or
-	(5) this CPU attempted to write to a cache line that is
+	\item This CPU attempted to write to a cache line that is
 	currently read-only, possibly due to that line being replicated
 	in other CPUs' caches.
+	\end{enumerate*}
 \item[\IXalth{Capacity Miss}{capacity}{cache miss}:]
 	A cache miss incurred because the corresponding CPU has recently
 	accessed more data than will fit into the cache.
@@ -462,7 +464,7 @@
 	is a pre-existing writer, any threads attempting to write must
 	wait for the writer to release the lock.
 	A key concern for reader-writer locks is ``fairness'':
-	can an unending stream of readers starve a writer or vice versa.
+	Can an unending stream of readers starve a writer or vice versa.
 \item[\IX{Real Time}:]
 	A situation in which getting the correct result is not sufficient,
 	but where this result must also be obtained within a given amount
-- 
2.17.1



  reply	other threads:[~2021-08-17 10:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 10:14 [PATCH -perfbook 00/11] Break and capitalize after colon, take four Akira Yokosawa
2021-08-17 10:16 ` Akira Yokosawa [this message]
2021-08-17 10:18 ` [PATCH -perfbook 02/11] glossary: Put missing question mark Akira Yokosawa
2021-08-17 10:19 ` [PATCH -perfbook 03/11] treewide: Adjust punctuation convention Akira Yokosawa
2021-08-17 10:21 ` [PATCH -perfbook 04/11] Add \ignorespaces command to \IfEbookSize and \IfSansSerif Akira Yokosawa
2021-08-17 18:29   ` Paul E. McKenney
2021-08-17 20:22     ` Paul E. McKenney
2021-08-17 23:31     ` Akira Yokosawa
2021-08-17 23:50       ` Paul E. McKenney
2021-08-17 10:23 ` [PATCH -perfbook 05/11] datastruct: Use \tco{} inside inline enumerate list Akira Yokosawa
2021-08-17 10:29 ` [PATCH -perfbook 06/11] periodcheck: Add colon-related checks Akira Yokosawa
2021-08-17 10:33 ` [PATCH -perfbook 07/11] cleverefcheck: Check lower-case word after \item Akira Yokosawa
2021-08-17 10:35 ` [PATCH -perfbook 08/11] periodcheck: Improve regex Akira Yokosawa
2021-08-17 10:37 ` [PATCH -perfbook 09/11] periodcheck: Use counter to prevent false negatives Akira Yokosawa
2021-08-17 10:39 ` [PATCH -perfbook 10/11] cleverefcheck: Add pattern to catch typo in indexing macros Akira Yokosawa
2021-08-17 10:40 ` [PATCH -perfbook 11/11] Makefile: Rename periodcheck --> punctcheck Akira Yokosawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=825fec8b-9803-b9b0-dd3f-13eba2cfb0a1@gmail.com \
    --to=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox