All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -perfbook 1/2] defer/whichtochoose: Use parnotes for footnote in tabularx
@ 2022-06-24 14:26 Akira Yokosawa
  2022-06-24 14:28 ` [PATCH -perfbook 2/2] defer/whichtochoose: Fix trivial typos Akira Yokosawa
  0 siblings, 1 reply; 2+ messages in thread
From: Akira Yokosawa @ 2022-06-24 14:26 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Due to conflict between LaTeX Packages hyperref and tabularx,
both of them attempt to tweak the internal code of \footnote{}
command, normal footnotes don't work in tabularx.

This made Paul use a primitive approach for the footnote added in
commit 1760abb74224 ("defer/whichtochoose: Note possibility of
membarrier() for hazptr").

Alternative way for footnotes inside tabularx is to use the
"parnotes" package, whose implementation is orthogonal to hyperref
and tabularx.

This commit employs this approach and uses the command \parnote in
tabularx, and encloses the footnote-printing \parnotes command in
a minipage to prevent the footnote text from centered.

As hyperref is not aware of parnotes, there is no crossref to the
footnote text.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
Hi Paul,

I'm not sure if you are happy with the addition of yet another
LaTeX package dependency, but I just wanted to show you this is
possible.  There might be other places where "parnotes" fits.

The trick of minipage for preventing centering should work in
your primitive approach.

It's up to you to take this one or not.

        Thanks, Akira
--
 defer/whichtochoose.tex | 13 +++++++------
 perfbook-lt.tex         |  1 +
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/defer/whichtochoose.tex b/defer/whichtochoose.tex
index 3c8cc2dccaef..95b355a1c471 100644
--- a/defer/whichtochoose.tex
+++ b/defer/whichtochoose.tex
@@ -217,7 +217,9 @@ But those wishing more detail should continue on to the next section.
 	Reader Per-Object Traversal Overhead
 		& Read-modify-write atomic operations, memory\-/barrier
 		  instructions, and cache misses
-			& \tco{smp_mb()} *
+			& \tco{smp_mb()}\parnote[*]{This \co{smp_mb()} can be
+				downgraded to a compiler \co{barrier()} by using
+				the Linux-kernel \co{membarrier()} system call.}
 				& None, but unsafe
 					& None (volatile accesses) \\
 	Reader Forward Progress Guarantee
@@ -253,11 +255,10 @@ But those wishing more detail should continue on to the next section.
 	\bottomrule
 \end{tabularx}
 }
-
-~
-
-* This \co{smp_mb()} can be downgraded to a compiler \co{barrier()} by
-using the Linux-kernel \co{membarrier()} system call.
+\begin{minipage}{\onecolumntextwidth}
+	\vspace*{1ex}
+	\parnotes
+\end{minipage}
 \caption{Which Deferred Technique to Choose?
 					     (Details)}
 \label{tab:defer:Which Deferred Technique to Choose?  (Details)}
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index d70dde66f725..9cde2e4d42e5 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -75,6 +75,7 @@
 \usepackage[split,makeindex]{splitidx}
 \usepackage[nottoc]{tocbibind}
 \usepackage[columns=3,totoc,indentunit=12pt,justific=raggedright,font=small,columnsep=.15in]{idxlayout}
+\usepackage{parnotes} % for footnotes in tabularx
 \usepackage[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0},linktoc=all]{hyperref}
 \usepackage{footnotebackref} % to enable cross-ref of footnote
 \usepackage[all]{hypcap} % for going to the top of figure and table

base-commit: 1760abb742247869ac06cee18289f0a36d4d973b
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH -perfbook 2/2] defer/whichtochoose: Fix trivial typos
  2022-06-24 14:26 [PATCH -perfbook 1/2] defer/whichtochoose: Use parnotes for footnote in tabularx Akira Yokosawa
@ 2022-06-24 14:28 ` Akira Yokosawa
  0 siblings, 0 replies; 2+ messages in thread
From: Akira Yokosawa @ 2022-06-24 14:28 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 defer/whichtochoose.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/defer/whichtochoose.tex b/defer/whichtochoose.tex
index 95b355a1c471..489299a7ae02 100644
--- a/defer/whichtochoose.tex
+++ b/defer/whichtochoose.tex
@@ -83,7 +83,7 @@ techniques from one another.
 The ``Readers'' row summarizes the results presented in
 \cref{fig:defer:Pre-BSD Routing Table Protected by RCU QSBR},
 which shows that all but \IXalt{reference counting}{reference count}
-are enjoy reasonably fast and scalable readers.
+enjoy reasonably fast and scalable readers.
 
 The ``Number of Protected Objects'' row evaluates each technique's need
 for external storage with which to record reader protection.
@@ -336,7 +336,7 @@ has a \IXalth{bounded wait-free}{bounded}{wait free}
 it can carry out a finite traversal by executing a bounded number of
 instructions.
 
-The ``Reader Reference Acquisition'' rows indicates that only RCU is
+The ``Reader Reference Acquisition'' row indicates that only RCU is
 capable of unconditionally acquiring references.
 The entry for sequence locks is ``Unsafe'' because, again, sequence locks
 detect updates rather than acquiring references.
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-24 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 14:26 [PATCH -perfbook 1/2] defer/whichtochoose: Use parnotes for footnote in tabularx Akira Yokosawa
2022-06-24 14:28 ` [PATCH -perfbook 2/2] defer/whichtochoose: Fix trivial typos Akira Yokosawa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.