defer/whichtochoose: Use parnotes for footnote in tabularx
PATCH 1/2 defer/whichtochoose: Use parnotes for footnote in tabularx
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.
---
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(-)
defer/whichtochoose.tex +7 -6
@@ -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)}
perfbook-lt.tex +1 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 2/2 defer/whichtochoose: Fix trivial typos
--- defer/whichtochoose.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
defer/whichtochoose.tex +2 -2
@@ -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.
Signature · 1 line
2.25.1