Skip to contentSkip to conversation

Fixup trivial nitpicks under defer/

PATCH In review SeongJae Park 2 participants 6 messages Jul 1, 2016

lore
Share & tools
lore
#0 lore raw

cover Fixup trivial nitpicks under defer/

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

SeongJae Park (4):
defer: Fix typos
defer: Insert missing tildes
defer: Add missing dot
defer/seqlock: Fix wrong line reference

 defer/defer.tex          |  4 ++--
 defer/rcufundamental.tex |  6 +++---
 defer/seqlock.tex        | 14 +++++++-------
 defer/toyrcu.tex         | 10 +++++-----
 defer/whichtochoose.tex  |  2 +-
 5 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/4 defer: Fix typos

---
 defer/defer.tex          | 4 ++--
 defer/rcufundamental.tex | 2 +-
 defer/seqlock.tex        | 2 +-
 defer/whichtochoose.tex  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
defer/defer.tex +2 -2
index 437b131..29c99e1 100644
@@ -16,7 +16,7 @@ deferring work often enables weakening of synchronization primitives,
 thereby reducing synchronization overhead.
 General approaches work deferral include
 reference counting (Section~\ref{sec:defer:Reference Counting}),
-hazard pointesr (Section~\ref{sec:defer:Hazard Pointers}),
+hazard pointers (Section~\ref{sec:defer:Hazard Pointers}),
 sequence locking (Section~\ref{sec:defer:Sequence Locks}),
 and RCU (Section~\ref{sec:defer:Read-Copy Update (RCU)}).
 Finally, Section~\ref{sec:defer:Which to Choose?}
@@ -36,7 +36,7 @@ consisting of a simple linked list.\footnote{
 Modern demultiplexing algorithms use more complex data structures,
 for example, hash tables~\cite{McKenney92b}, however, as in
 Chapter~\ref{chp:Counting}, an extremely simple algorithm will
-help highlight isses specific to parallelism in an extremely
+help highlight issues specific to parallelism in an extremely
 easy-to-understand setting.
 
 We further simplify the algorithm by reducing the search key from
defer/rcufundamental.tex +1 -1
index 89d5adb..76f9aee 100644
@@ -642,7 +642,7 @@ freed, as shown on the final row of
 Figure~\ref{fig:defer:RCU Deletion From Linked List}.
 At this point, we have completed the deletion of
 element~\co{5,6,7}.
-The following section covers replacement.
+The following example covers replacement.
 
 \paragraph{Example 2: Maintaining Multiple Versions During Replacement}
 \label{sec:defer:Example 2: Maintaining Multiple Versions During Replacement}
defer/seqlock.tex +1 -1
index 7f81eb8..c9f34f7 100644
@@ -349,4 +349,4 @@ the possibility of read-side failure, let alone starvation.
 In addition, it would also be nice to overcome sequence locking's limitations
 with pointers.
 The following section presents a synchronization mechanism with exactly
-these proporties.
+these properties.
defer/whichtochoose.tex +1 -1
index 3ac3c46..6157b80 100644
@@ -71,7 +71,7 @@ that do encounter an update.
 
 Of course, as shown in the ``Updates and Readers Progress Concurrently''
 column, this detection of updates implies
-that sequence locking does not permit updates and readers to make forward
+that sequence locking does not permit updaters and readers to make forward
 progress concurrently.
 After all, preventing such forward progress is the whole point of using
 sequence locking in the first place!
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/4 defer: Insert missing tildes

In reply to SeongJae Park
---
 defer/rcufundamental.tex |  2 +-
 defer/seqlock.tex        | 10 +++++-----
 defer/toyrcu.tex         | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)
defer/rcufundamental.tex +1 -1
index 76f9aee..8c6e0c5 100644
@@ -734,7 +734,7 @@ Figure~\ref{fig:defer:RCU Replacement in Linked List}.
 As far as the readers are concerned, we are back to having a single version
 of the list, but with the new element in place of the old.
 
-After the \co{kfree()} on line 7 completes, the list will
+After the \co{kfree()} on line~7 completes, the list will
 appear as shown on the final row of
 Figure~\ref{fig:defer:RCU Replacement in Linked List}.
 
defer/seqlock.tex +5 -5
index c9f34f7..f56659f 100644
@@ -287,7 +287,7 @@ increment of the sequence number on line~44, then releases the lock.
 } \QuickQuizEnd
 
 \QuickQuiz{}
-	Why isn't \co{seq} on line 2 of
+	Why isn't \co{seq} on line~2 of
 	Figure~\ref{fig:defer:Sequence-Locking Implementation}
 	\co{unsigned} rather than \co{unsigned long}?
 	After all, if \co{unsigned} is good enough for the Linux
@@ -297,17 +297,17 @@ increment of the sequence number on line~44, then releases the lock.
 	The Linux kernel has a number of special attributes that allow
 	it to ignore the following sequence of events:
 	\begin{enumerate}
-	\item	Thread 0 executes \co{read_seqbegin()}, picking up
+	\item	Thread~0 executes \co{read_seqbegin()}, picking up
 		\co{->seq} in line~17, noting that the value is even,
 		and thus returning to the caller.
-	\item	Thread 0 starts executing its read-side critical section,
+	\item	Thread~0 starts executing its read-side critical section,
 		but is then preempted for a long time.
 	\item	Other threads repeatedly invoke \co{write_seqlock()} and
 		\co{write_sequnlock()}, until the value of \co{->seq}
 		overflows back to the value that Thread~0 fetched.
-	\item	Thread 0 resumes execution, completing its read-side
+	\item	Thread~0 resumes execution, completing its read-side
 		critical section with inconsistent data.
-	\item	Thread 0 invokes \co{read_seqretry()}, which incorrectly
+	\item	Thread~0 invokes \co{read_seqretry()}, which incorrectly
 		concludes that Thread~0 has seen a consistent view of
 		the data protected by the sequence lock.
 	\end{enumerate}
defer/toyrcu.tex +5 -5
index 3f098c6..2177e6d 100644
@@ -1578,9 +1578,9 @@ overhead.
 		greater than that of the global \co{rcu_gp_ctr}.
 	\item	Thread~0 acquires a reference to RCU-protected data
 		element~A.
-	\item	Thread 1 now removes the data element~A that thread~0
+	\item	Thread~1 now removes the data element~A that thread~0
 		just acquired a reference to.
-	\item	Thread 1 invokes \co{synchronize_rcu()}, which
+	\item	Thread~1 invokes \co{synchronize_rcu()}, which
 		increments the global \co{rcu_gp_ctr} by
 		\co{RCU_GP_CTR_BOTTOM_BIT}.
 		It then checks all of the per-thread \co{rcu_reader_gp}
@@ -1589,7 +1589,7 @@ overhead.
 		\co{synchronize_rcu()}, so thread~1 does not wait
 		for thread~0 to complete its RCU read-side critical
 		section.
-	\item	Thread 1 then frees up data element~A, which thread~0
+	\item	Thread~1 then frees up data element~A, which thread~0
 		is still referencing.
 	\end{enumerate}
 
@@ -1707,9 +1707,9 @@ using the aforementioned quiescent states.
 Each of these quiescent states contains a call to
 \co{rcu_quiescent_state()}, which is shown from lines~9-15 in the figure.
 Threads entering extended quiescent states (for example, when blocking)
-may instead call \co{rcu_thread_offline()} (lines 17-23) when entering
+may instead call \co{rcu_thread_offline()} (lines~17-23) when entering
 an extended quiescent state and then call
-\co{rcu_thread_online()} (lines 25-28) when leaving it.
+\co{rcu_thread_online()} (lines~25-28) when leaving it.
 As such, \co{rcu_thread_online()} is analogous to \co{rcu_read_lock()}
 and \co{rcu_thread_offline()} is analogous to \co{rcu_read_unlock()}.
 In addition, \co{rcu_quiescent_state()} can be thought of as a
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/4 defer: Add missing dot

In reply to SeongJae Park
---
 defer/rcufundamental.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
defer/rcufundamental.tex +1 -1
index 8c6e0c5..48f020f 100644
@@ -385,7 +385,7 @@ circular list:
 \QuickQuizAnswer{
 	Because in an hlist it is necessary to check for
 	NULL rather than for encountering the head.
-	(Try coding up a single-pointer {\tt hlist\_for\_each\_entry\_rcu()}
+	(Try coding up a single-pointer {\tt hlist\_for\_each\_entry\_rcu()}.
 	If you come up with a nice solution, it would be a very good thing!)
 } \QuickQuizEnd
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/4 defer/seqlock: Fix wrong line reference

In reply to SeongJae Park

One sentence is referencing code line incorrectly. This commit fix it.

---
 defer/seqlock.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
defer/seqlock.tex +1 -1
index f56659f..fb733e6 100644
@@ -229,7 +229,7 @@ were no writers present since the time of the corresponding
 call to \co{read_seqbegin()}.
 Line~29 orders the caller's prior critical section before line~30's
 fetch of the new snapshot of the sequence counter.
-Finally, line~30 checks that the sequence counter has not changed,
+Finally, line~31 checks that the sequence counter has not changed,
 in other words, that there has been no writer, and returns true if so.
 
 \QuickQuiz{}
Signature · 1 line
1.9.1
#5 lore raw
In reply to SeongJae Park
Quoted 9 lines · SeongJae Park

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

SeongJae Park (4):
defer: Fix typos
defer: Insert missing tildes
defer: Add missing dot
defer/seqlock: Fix wrong line reference

Quoted 6 lines
 defer/defer.tex          |  4 ++--
 defer/rcufundamental.tex |  6 +++---
 defer/seqlock.tex        | 14 +++++++-------
 defer/toyrcu.tex         | 10 +++++-----
 defer/whichtochoose.tex  |  2 +-
 5 files changed, 18 insertions(+), 18 deletions(-)

Very good, thank you!

I queued and pushd 1, 2, and 4. #3 was in an obsolete passage, so I queued a commit deleting it.

Thanx, Paul