[PATCH -perfbook 3/5] cpu, toolsoftrade, count, rcuapi: Shrink floats for ebook reader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit demonstrates usages of \ebresizewidth, \ebresizewidthsw,
and \ebresizeverb.

NOTE:
o One of sidewaystable in rcuapi uses \ebresizeverb, since tabularx
  in sidewaystable behaves unexpectedly with \ebresizewidthsw.
  The table has APIs enclosed in \tco{} which desides the widths of
  columns.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
Acked-by: Balbir Singh <bsingharora@xxxxxxxxx>
---
 count/count.tex               | 15 +++++++++++----
 cpu/overheads.tex             |  2 ++
 defer/rcuapi.tex              | 12 +++++++++++-
 toolsoftrade/toolsoftrade.tex |  2 ++
 4 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/count/count.tex b/count/count.tex
index cafbcafc..5e09285e 100644
--- a/count/count.tex
+++ b/count/count.tex
@@ -967,7 +967,7 @@ converge on the true value---hence this approach qualifies as
 eventually consistent.
 
 \begin{listing}[tbp]
-\input{CodeSamples/count/count_stat_eventual@xxxxxxxxx}
+\ebresizeverb{.9}{\input{CodeSamples/count/count_stat_eventual@xxxxxxxxx}}
 \caption{Array-Based Per-Thread Eventually Consistent Counters}
 \label{lst:count:Array-Based Per-Thread Eventually Consistent Counters}
 \end{listing}
@@ -1666,7 +1666,11 @@ line~\lnref{adjglobal} makes the corresponding adjustment to
 
 \begin{figure*}[tb]
 \centering
+\IfEbookSize{
+\resizebox{\textwidth}{!}{\includegraphics{count/globbal}}
+}{
 \resizebox{5in}{!}{\includegraphics{count/globbal}}
+}
 \caption{Schematic of Globalization and Balancing}
 \label{fig:count:Schematic of Globalization and Balancing}
 \end{figure*}
@@ -1981,7 +1985,7 @@ the result.
 }\QuickQuizEnd
 
 \begin{listing}[tbp]
-\input{CodeSamples/count/count_lim_atomic@add_sub.fcv}
+\ebresizeverb{.81}{\input{CodeSamples/count/count_lim_atomic@add_sub.fcv}}
 \caption{Atomic Limit Counter Add and Subtract}
 \label{lst:count:Atomic Limit Counter Add and Subtract}
 \end{listing}
@@ -2241,6 +2245,7 @@ line~\lnref{unregister:b}.
 }\QuickQuizEnd
 
 The next section qualitatively evaluates this design.
+\ebFloatBarrier
 
 \subsection{Atomic Limit Counter Discussion}
 
@@ -2384,7 +2389,7 @@ and \co{theft} variables, respectively.
 \end{fcvref}
 
 \begin{listing}[tbp]
-\input{CodeSamples/count/count_lim_sig@xxxxxxxx}
+\ebresizeverb{.9}{\input{CodeSamples/count/count_lim_sig@xxxxxxxx}}
 \caption{Signal-Theft Limit Counter Data}
 \label{lst:count:Signal-Theft Limit Counter Data}
 \end{listing}
@@ -2413,7 +2418,7 @@ state to READY\@.
 \end{fcvref}
 
 \begin{listing}[tbp]
-\input{CodeSamples/count/count_lim_sig@xxxxxxxxxxxxx}
+\ebresizeverb{.81}{\input{CodeSamples/count/count_lim_sig@xxxxxxxxxxxxx}}
 \caption{Signal-Theft Limit Counter Value-Migration Functions}
 \label{lst:count:Signal-Theft Limit Counter Value-Migration Functions}
 \end{listing}
@@ -2834,6 +2839,7 @@ will expand on these lessons.
 \small
 \centering
 \newcommand{\NA}{\cellcolor{white}}
+\ebresizewidth{
 \begin{tabular}{lrcS[table-format=2.1]S[table-format=3.0]S[table-format=4.0]
 		  S[table-format=6.0]S[table-format=6.0]}
 	\toprule
@@ -2869,6 +2875,7 @@ will expand on these lessons.
 		Y &  4.7 & 519 & 6 805 & 120 000 & 238 811 \\
 	\bottomrule
 \end{tabular}
+}
 \caption{Statistical/Limit Counter Performance on x86}
 \label{tab:count:Statistical/Limit Counter Performance on x86}
 \end{table*}
diff --git a/cpu/overheads.tex b/cpu/overheads.tex
index 9a39e5a3..6b3b7008 100644
--- a/cpu/overheads.tex
+++ b/cpu/overheads.tex
@@ -137,6 +137,7 @@ optimization.
 \rowcolors{1}{}{lightgray}
 \renewcommand*{\arraystretch}{1.1}
 \centering\small
+\ebresizewidth{
 \begin{tabular}
   {
     l
@@ -166,6 +167,7 @@ optimization.
 	Global Comms	& 195 000 000 & 409 500 000 & \\
 	\bottomrule
 \end{tabular}
+}
 \caption{CPU 0 View of Synchronization Mechanisms on 8-Socket System With Intel Xeon Platinum 8176 CPUs @ 2.10\,GHz}
 \label{tab:cpu:CPU 0 View of Synchronization Mechanisms on 8-Socket System With Intel Xeon Platinum 8176 CPUs at 2.10GHz}
 \end{table*}
diff --git a/defer/rcuapi.tex b/defer/rcuapi.tex
index 74efb10d..b4c2763e 100644
--- a/defer/rcuapi.tex
+++ b/defer/rcuapi.tex
@@ -51,7 +51,8 @@ API~\cite{PaulEMcKenney2019RCUAPI}.\footnote{
 \centering
 \caption{RCU Wait-to-Finish APIs}
 \label{tab:defer:RCU Wait-to-Finish APIs}
-\scriptsize\hspace*{-.125in}
+\scriptsize\IfEbookSize{\hspace*{-1.8in}}{\hspace*{-.125in}}
+\ebresizeverb{0.7}{
 \begin{tabularx}{8.5in}{>{\raggedright\arraybackslash}p{0.94in}
     >{\raggedright\arraybackslash}X
     >{\raggedright\arraybackslash}X
@@ -146,6 +147,7 @@ API~\cite{PaulEMcKenney2019RCUAPI}.\footnote{
 		    N/A \\
 \bottomrule
 \end{tabularx}
+}
 \end{sidewaystable*}
 
 If you are new to RCU, you might consider focusing on just one
@@ -415,6 +417,7 @@ that Linux supports~\cite{Spraul01}.
 \renewcommand*{\arraystretch}{1.15}
 \footnotesize
 \centering\OneColumnHSpace{-.4in}
+\ebresizewidth{
 \begin{tabular}{llp{2.2in}}
 \toprule
 Category &
@@ -457,6 +460,7 @@ Pointer subscribe (traveral) &
 		Simple instructions (memory barrier on Alpha) \\
 \bottomrule
 \end{tabular}
+}
 \caption{RCU Publish-Subscribe and Version Maintenance APIs}
 \label{tab:defer:RCU Publish-Subscribe and Version Maintenance APIs}
 \end{table*}
@@ -737,6 +741,7 @@ be a separate spinlock to be stored with the pointer itself.
   \setlength{\cwa}{1.95in}\setlength{\cwb}{2.15in}
   \setlength{\cwc}{1.9in}\setlength{\cwd}{1.7in}
 }
+\ebresizewidthsw{
 \begin{tabular}{>{\raggedright\arraybackslash}p{\cwa}
     >{\raggedright\arraybackslash}p{\cwb}
     >{\raggedright\arraybackslash}p{\cwc}
@@ -820,6 +825,7 @@ be a separate spinlock to be stored with the pointer itself.
 	    \\
 \bottomrule
 \end{tabular}
+}
 \end{sidewaystable*}
 
 The API members for these linked-list variants are summarized in
@@ -854,7 +860,11 @@ kfree(p);				\lnlbl[kfree]
 
 \begin{figure}[tbp]
 \centering
+\IfEbookSize{
+\resizebox{2in}{!}{\includegraphics{defer/RCUReplacement}}
+}{
 \resizebox{2.7in}{!}{\includegraphics{defer/RCUReplacement}}
+}
 \caption{RCU Replacement in Linked List}
 \label{fig:defer:RCU Replacement in Linked List}
 \end{figure}
diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index 9e0838cb..bf34d2ca 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -479,7 +479,9 @@ lock~\cite{Hoare74}.
 }\QuickQuizEnd
 
 \begin{listing}[tbp]
+\ebresizeverb{.85}{
 \input{CodeSamples/toolsoftrade/lock@reader_writer.fcv}
+}
 \caption{Demonstration of Exclusive Locks}
 \label{lst:toolsoftrade:Demonstration of Exclusive Locks}
 \end{listing}
-- 
2.17.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux