Misc updates and fixes
cover Misc updates and fixes
From 11f5734bf4b31fbb51cd6ec603d680a8b3f4f99c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 28 Jan 2017 20:01:42 +0900
Subject: [PATCH 0/4] Misc updates and fixes
Hi Paul,
This is a collection of random updates and fixes.
Patch 4 replaces non-hyphenation dashes with math mode minus signs. As you know, I dislike such uses of dashes in LaTeX source. ;-)
Thanks, Akira
--
Akira Yokosawa (4):
Update hyphen-to-endash scripts advsync/memorybarriers: Use American spelling (initialize)
together: Typo fix (a RCU ... -> an RCU ...)
Use math mode minus signs for dashes in tables
advsync/memorybarriers.tex | 2 +- appendix/whymb/whymemorybarriers.tex | 20 ++++++++++---------- together/applyrcu.tex | 2 +- together/refcnt.tex | 8 ++++---- utilities/bibhyphen2endash.sh | 27 +++++++++++++++++++++++++++ utilities/dohyphen2endash.sh | 12 ++++++++++++ utilities/hyphen2endash.sh | 4 +++- 7 files changed, 58 insertions(+), 17 deletions(-) create mode 100644 utilities/bibhyphen2endash.sh
Signature · 1 line
2.7.4
PATCH 1/4 Update hyphen-to-endash scripts
From b1654e9d60fe96de07c50e2293205495d04358f3 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 3 Jan 2017 19:03:04 +0900
Subject: [PATCH 1/4] Update hyphen-to-endash scripts
Add script for converting hyphen to endash in .bib files. Also add a rule for auto updated year range in legal page.
--- utilities/bibhyphen2endash.sh | 27 +++++++++++++++++++++++++++ utilities/dohyphen2endash.sh | 12 ++++++++++++ utilities/hyphen2endash.sh | 4 +++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 utilities/bibhyphen2endash.sh
utilities/bibhyphen2endash.sh new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/sh +# +# Find hyphens used for number range and replace them with en dashes. +# (for bibliography pages field, conversion to en dash is done by BiBTeX) +# +# Replacement candidate +# Volumes mm-nn -> Volumes mm--nn +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. +# +# Copyright (C) Akira Yokosawa, 2017 +# +# Authors: Akira Yokosawa <[email protected]> + +cat $1 | sed -e 's/Volumes \([0-9]\+\)-\([0-9]\+\)/Volumes \1--\2/g'
utilities/dohyphen2endash.sh +12 -0
@@ -71,4 +71,16 @@ do cp -f $tmpf $basename.tex fi done +bibfiles=`find bib -name '*.bib' -print` +for i in $bibfiles +do + basename="${i%.bib}" +# echo $basename.bib + sh ./utilities/bibhyphen2endash.sh $basename.bib > $tmpf + if ! diff -q $basename.bib $tmpf >/dev/null + then + echo "$basename.bib modified" + cp -f $tmpf $basename.bib + fi +done rm -f $tmpf
utilities/hyphen2endash.sh +3 -1
@@ -18,6 +18,7 @@ # and~nn-mm -> and~nn--mm # Figures~\ref{foo}-\ref{bar} -> Figures~\ref{foo}--\ref{bar} # \co{xxx}-\{yyy} -> \co{xxx}--\co{yyy} +# yyyy-\commityear -> yyyy--\commityear (in Legal statement) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
@@ -33,7 +34,7 @@ # along with this program; if not, you can access it online at # http://www.gnu.org/licenses/gpl-2.0.html. # -# Copyright (C) Akira Yokosawa, 2016 +# Copyright (C) Akira Yokosawa, 2016, 2017 # # Authors: Akira Yokosawa <[email protected]>
@@ -44,6 +45,7 @@ cat $1 | -e 's/CPUs[ ~]\([0-9]\+\)-\([0-9]\+\)/CPUs~\1--\2/g' \ -e 's/and[ ~]\([0-9]\+\)-\([0-9]\+\)/and~\1--\2/g' \ -e 's/\(\\co{[^}]*}\)-\(\\co{[^}]*}\)/\1--\2/g' \ + -e 's/\([0-9]\)-\(\\commityear\)/\1--\2/g' \ -e 's/\/\* Lines~\([0-9]\+\)--\([0-9]\+\) \*\//\/\* Lines \1-\2 \*\//g' # Last pattern is to preserve "Lines n-m" in comments within code snippet
Signature · 1 line
2.7.4
PATCH 2/4 advsync/memorybarriers: Use American spelling (initialize)
In reply to Akira YokosawaFrom edeae13c28aa406ce984c63f91556b4c6595679b Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 1 Jan 2017 18:17:55 +0900
Subject: [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize)
--- advsync/memorybarriers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
@@ -1760,7 +1760,7 @@ RCU system, for example, see \co{rcu_dereference()} in \path{include/linux/rcupdate.h}. This permits the current target of an RCU'd pointer to be replaced with a new modified target, without -the replacement target appearing to be incompletely initialised. +the replacement target appearing to be incompletely initialized. See also Section~\ref{sec:advsync:Cache Coherency}
Signature · 1 line
2.7.4
PATCH 3/4 together: Typo fix (a RCU ... -> an RCU ...)
In reply to Akira YokosawaFrom 5a71dfe6dbac0d358aa2c004a2250279dbd9b1ed Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 6 Jan 2017 00:07:19 +0900
Subject: [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...)
--- together/applyrcu.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
together/applyrcu.tex +1 -1
@@ -332,7 +332,7 @@ lock. This section shows how RCU may be used to avoid this overhead. The code for performing an I/O is quite similar to the original, with -a RCU read-side critical section being substituted for the reader-writer +an RCU read-side critical section being substituted for the reader-writer lock read-side critical section in the original: \vspace{5pt}
Signature · 1 line
2.7.4
PATCH 4/4 Use math mode minus signs for dashes in tables
In reply to Akira YokosawaFrom 11f5734bf4b31fbb51cd6ec603d680a8b3f4f99c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 5 Jan 2017 20:50:58 +0900
Subject: [PATCH 4/4] Use math mode minus signs for dashes in tables
By using math mode minus, \makebox{} surrounding ``-'' can be removed.
--- appendix/whymb/whymemorybarriers.tex | 20 ++++++++++---------- together/refcnt.tex | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-)
appendix/whymb/whymemorybarriers.tex +10 -10
@@ -570,24 +570,24 @@ Finally, CPU~1 reads the cache line at address~8, which uses a \cline{4-7} Sequence \# & CPU \# & Operation & 0 & 1 & 2 & 3 & 0 & 8 \\ \hline -% Seq CPU Operation --------- CPU -------- - Memory - -% 0 1 2 3 0 8 +% Seq CPU Operation ------------- CPU ------------- - Memory - +% 0 1 2 3 0 8 \hline - 0 & & Initial State & -/I & -/I & -/I & -/I & V & V \\ + 0 & & Initial State & $-$/I & $-$/I & $-$/I & $-$/I & V & V \\ \hline - 1 & 0 & Load & 0/S & -/I & -/I & -/I & V & V \\ + 1 & 0 & Load & 0/S & $-$/I & $-$/I & $-$/I & V & V \\ \hline - 2 & 3 & Load & 0/S & -/I & -/I & 0/S & V & V \\ + 2 & 3 & Load & 0/S & $-$/I & $-$/I & 0/S & V & V \\ \hline - 3 & 0 & Invalidation & 8/S & -/I & -/I & 0/S & V & V \\ + 3 & 0 & Invalidation & 8/S & $-$/I & $-$/I & 0/S & V & V \\ \hline - 4 & 2 & RMW & 8/S & -/I & 0/E & -/I & V & V \\ + 4 & 2 & RMW & 8/S & $-$/I & 0/E & $-$/I & V & V \\ \hline - 5 & 2 & Store & 8/S & -/I & 0/M & -/I & I & V \\ + 5 & 2 & Store & 8/S & $-$/I & 0/M & $-$/I & I & V \\ \hline - 6 & 1 & Atomic Inc & 8/S & 0/M & -/I & -/I & I & V \\ + 6 & 1 & Atomic Inc & 8/S & 0/M & $-$/I & $-$/I & I & V \\ \hline - 7 & 1 & Writeback & 8/S & 8/S & -/I & -/I & V & V \\ + 7 & 1 & Writeback & 8/S & 8/S & $-$/I & $-$/I & V & V \\ \end{tabular} \caption{Cache Coherence Example} \label{tab:app:whymb:Cache Coherence Example}
together/refcnt.tex +4 -4
@@ -74,7 +74,7 @@ locking, and RCU. Synchronization & Locking & Counting & RCU \\ \hline \hline - Locking & - & CAM & CA \\ + Locking & $-$ & CAM & CA \\ \hline Reference & A & AM & A \\ Counting & & & \\
@@ -94,7 +94,7 @@ This table divides reference-counting mechanisms into the following broad categories: \begin{enumerate} \item Simple counting with neither atomic operations, memory - barriers, nor alignment constraints \makebox{(``-'')}. + barriers, nor alignment constraints (``$-$''). \item Atomic counting without memory barriers (``A''). \item Atomic counting, with memory barriers required only on release (``AM'').
@@ -116,7 +116,7 @@ contain memory barriers, and all checked acquisition operations also contain memory barriers. Therefore, cases ``CA'' and ``MCA'' are equivalent to ``CAM'', so that there are sections below for only the first four cases: -\makebox{``-''}, ``A'', ``AM'', and ``CAM''. +``$-$'', ``A'', ``AM'', and ``CAM''. The Linux primitives that support reference counting are presented in Section~\ref{sec:together:Linux Primitives Supporting Reference Counting}. Later sections cite optimizations that can improve performance
@@ -126,7 +126,7 @@ reference count need be checked for zero only very rarely. \subsection{Implementation of Reference-Counting Categories} \label{sec:together:Implementation of Reference-Counting Categories} -Simple counting protected by locking (\makebox{``-''}) is described in +Simple counting protected by locking (``$-$'') is described in Section~\ref{sec:together:Simple Counting}, atomic counting with no memory barriers (``A'') is described in Section~\ref{sec:together:Atomic Counting},
Signature · 1 line
2.7.4
Paul E. McKenney
AppliedQuoted 11 lines · Akira Yokosawa
Quoted 1 line
From
11f5734bf4b31fbb51cd6ec603d680a8b3f4f99cMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sat, 28 Jan 2017 20:01:42 +0900
Subject: [PATCH 0/4] Misc updates and fixesHi Paul,
This is a collection of random updates and fixes.
Patch 4 replaces non-hyphenation dashes with math mode minus signs. As you know, I dislike such uses of dashes in LaTeX source. ;-)
Applied, thank you!
But I am beginning to think in terms of just not using hyphens to indicate inapplicable or missing information. ;-)
Thanx, Paul
Quoted 21 lines
Thanks, Akira
--
Akira Yokosawa (4):
Update hyphen-to-endash scripts advsync/memorybarriers: Use American spelling (initialize)
together: Typo fix (a RCU ... -> an RCU ...)
Use math mode minus signs for dashes in tablesadvsync/memorybarriers.tex | 2 +- appendix/whymb/whymemorybarriers.tex | 20 ++++++++++---------- together/applyrcu.tex | 2 +- together/refcnt.tex | 8 ++++---- utilities/bibhyphen2endash.sh | 27 +++++++++++++++++++++++++++ utilities/dohyphen2endash.sh | 12 ++++++++++++ utilities/hyphen2endash.sh | 4 +++- 7 files changed, 58 insertions(+), 17 deletions(-) create mode 100644 utilities/bibhyphen2endash.shSignature · 1 line
2.7.4