All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memorder: Adjust height of Table 15.5's header
@ 2017-11-01 14:27 Akira Yokosawa
  2017-11-01 14:51 ` Paul E. McKenney
  0 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2017-11-01 14:27 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From a7e4a7ee67e980055dbef5808b89335fc0eba483 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Wed, 1 Nov 2017 23:14:44 +0900
Subject: [PATCH] memorder: Adjust height of Table 15.5's header

While we are here, for the ease of maintenance of the table,
define a helper macro "\cpufml{}" to be used in the header.

Also adjust hspace for 1c layout and comment out a paragraph
which is pointless for the moment.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 memorder/memorder.tex | 45 ++++++++++++++-------------------------------
 1 file changed, 14 insertions(+), 31 deletions(-)

diff --git a/memorder/memorder.tex b/memorder/memorder.tex
index db5e065..b7d20f0 100644
--- a/memorder/memorder.tex
+++ b/memorder/memorder.tex
@@ -3980,39 +3980,22 @@ dependencies.
 \rowcolors{4}{}{lightgray}
 \small
 \centering
-\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.6in}
+\newcommand{\cpufml}[1]{\begin{picture}(6,50)(0,0)\rotatebox{90}{#1}\end{picture}}
+\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.35in}
 \begin{tabular}{llccccccccc}
 	\toprule
 	\multicolumn{2}{l}{~} & \multicolumn{9}{c}{CPU Family} \\
 	\cmidrule{3-11}
 	\multicolumn{2}{c}{\raisebox{.5ex}{Property}}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{Alpha}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{ARMv8}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{ARMv7-A/R}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{Itanium}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{MIPS}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{\Power{}}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{SPARC TSO}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{x86}
-	  \end{picture}
-	& \begin{picture}(6,60)(0,0)
-		\rotatebox{90}{z~Systems}
-	  \end{picture}
+	& \cpufml{Alpha}
+	& \cpufml{ARMv8}
+	& \cpufml{ARMv7-A/R}
+	& \cpufml{Itanium}
+	& \cpufml{MIPS}
+	& \cpufml{\Power{}}
+	& \cpufml{SPARC TSO}
+	& \cpufml{x86}
+	& \cpufml{z~Systems}
 	\\
 	\cmidrule(r){1-2} \cmidrule{3-11}
 %		 Alpha ARMv8 ARMv7 Itanium MIPS PPC SPARC x86 z Systems
@@ -4070,7 +4053,7 @@ dependencies.
 	~ & ~ & C: & Compare-and-exchange instruction \\
 	~ & ~ & L: & Load-linked/store-conditional instruction \\
 \end{tabular}
-}\OneColumnHSpace{-0.7in}
+}\OneColumnHSpace{-0.4in}
 \caption{Summary of Memory Ordering}
 \label{tab:memorder:Summary of Memory Ordering}
 \end{table*}
@@ -4132,8 +4115,8 @@ instruction cache and pipeline.
 Such CPUs require special instructions be executed for self-modifying
 code.

-Parenthesized CPU names indicate modes that are architecturally allowed,
-but rarely used in practice.
+%Parenthesized CPU names indicate modes that are architecturally allowed,
+%but rarely used in practice.

 The common ``just say no'' approach to memory-ordering operations
 can be eminently reasonable where it applies,
-- 
2.7.4


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

* Re: [PATCH] memorder: Adjust height of Table 15.5's header
  2017-11-01 14:27 [PATCH] memorder: Adjust height of Table 15.5's header Akira Yokosawa
@ 2017-11-01 14:51 ` Paul E. McKenney
  2017-11-01 15:10   ` Akira Yokosawa
  2017-11-01 22:09   ` [PATCH] locking: Use helper macro in Table 7.1 Akira Yokosawa
  0 siblings, 2 replies; 5+ messages in thread
From: Paul E. McKenney @ 2017-11-01 14:51 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Nov 01, 2017 at 11:27:10PM +0900, Akira Yokosawa wrote:
> >From a7e4a7ee67e980055dbef5808b89335fc0eba483 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Wed, 1 Nov 2017 23:14:44 +0900
> Subject: [PATCH] memorder: Adjust height of Table 15.5's header
> 
> While we are here, for the ease of maintenance of the table,
> define a helper macro "\cpufml{}" to be used in the header.
> 
> Also adjust hspace for 1c layout and comment out a paragraph
> which is pointless for the moment.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>

Good catch on the stray paragraph, and \cpufml{} does make things much
nicer, thank you!!!  Queued and pushed.

There is another tables that could use this trick in locking/locking.tex.
I believe that the definitions should be local to each table because
the heights differ, and which quite oddly seem to need to be hard-coded.

							Thanx, Paul

> ---
>  memorder/memorder.tex | 45 ++++++++++++++-------------------------------
>  1 file changed, 14 insertions(+), 31 deletions(-)
> 
> diff --git a/memorder/memorder.tex b/memorder/memorder.tex
> index db5e065..b7d20f0 100644
> --- a/memorder/memorder.tex
> +++ b/memorder/memorder.tex
> @@ -3980,39 +3980,22 @@ dependencies.
>  \rowcolors{4}{}{lightgray}
>  \small
>  \centering
> -\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.6in}
> +\newcommand{\cpufml}[1]{\begin{picture}(6,50)(0,0)\rotatebox{90}{#1}\end{picture}}
> +\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.35in}
>  \begin{tabular}{llccccccccc}
>  	\toprule
>  	\multicolumn{2}{l}{~} & \multicolumn{9}{c}{CPU Family} \\
>  	\cmidrule{3-11}
>  	\multicolumn{2}{c}{\raisebox{.5ex}{Property}}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{Alpha}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{ARMv8}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{ARMv7-A/R}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{Itanium}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{MIPS}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{\Power{}}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{SPARC TSO}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{x86}
> -	  \end{picture}
> -	& \begin{picture}(6,60)(0,0)
> -		\rotatebox{90}{z~Systems}
> -	  \end{picture}
> +	& \cpufml{Alpha}
> +	& \cpufml{ARMv8}
> +	& \cpufml{ARMv7-A/R}
> +	& \cpufml{Itanium}
> +	& \cpufml{MIPS}
> +	& \cpufml{\Power{}}
> +	& \cpufml{SPARC TSO}
> +	& \cpufml{x86}
> +	& \cpufml{z~Systems}
>  	\\
>  	\cmidrule(r){1-2} \cmidrule{3-11}
>  %		 Alpha ARMv8 ARMv7 Itanium MIPS PPC SPARC x86 z Systems
> @@ -4070,7 +4053,7 @@ dependencies.
>  	~ & ~ & C: & Compare-and-exchange instruction \\
>  	~ & ~ & L: & Load-linked/store-conditional instruction \\
>  \end{tabular}
> -}\OneColumnHSpace{-0.7in}
> +}\OneColumnHSpace{-0.4in}
>  \caption{Summary of Memory Ordering}
>  \label{tab:memorder:Summary of Memory Ordering}
>  \end{table*}
> @@ -4132,8 +4115,8 @@ instruction cache and pipeline.
>  Such CPUs require special instructions be executed for self-modifying
>  code.
> 
> -Parenthesized CPU names indicate modes that are architecturally allowed,
> -but rarely used in practice.
> +%Parenthesized CPU names indicate modes that are architecturally allowed,
> +%but rarely used in practice.
> 
>  The common ``just say no'' approach to memory-ordering operations
>  can be eminently reasonable where it applies,
> -- 
> 2.7.4
> 


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

* Re: [PATCH] memorder: Adjust height of Table 15.5's header
  2017-11-01 14:51 ` Paul E. McKenney
@ 2017-11-01 15:10   ` Akira Yokosawa
  2017-11-01 22:09   ` [PATCH] locking: Use helper macro in Table 7.1 Akira Yokosawa
  1 sibling, 0 replies; 5+ messages in thread
From: Akira Yokosawa @ 2017-11-01 15:10 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/11/01 07:51:45 -0700, Paul E. McKenney wrote:
> On Wed, Nov 01, 2017 at 11:27:10PM +0900, Akira Yokosawa wrote:
>> >From a7e4a7ee67e980055dbef5808b89335fc0eba483 Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Wed, 1 Nov 2017 23:14:44 +0900
>> Subject: [PATCH] memorder: Adjust height of Table 15.5's header
>>
>> While we are here, for the ease of maintenance of the table,
>> define a helper macro "\cpufml{}" to be used in the header.
>>
>> Also adjust hspace for 1c layout and comment out a paragraph
>> which is pointless for the moment.
>>
>> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> 
> Good catch on the stray paragraph, and \cpufml{} does make things much
> nicer, thank you!!!  Queued and pushed.
> 
> There is another tables that could use this trick in locking/locking.tex.
> I believe that the definitions should be local to each table because
> the heights differ, and which quite oddly seem to need to be hard-coded.
I see. I'll take care of it tomorrow.

Akira

> 
> 							Thanx, Paul
> 
>> ---
>>  memorder/memorder.tex | 45 ++++++++++++++-------------------------------
>>  1 file changed, 14 insertions(+), 31 deletions(-)
>>
>> diff --git a/memorder/memorder.tex b/memorder/memorder.tex
>> index db5e065..b7d20f0 100644
>> --- a/memorder/memorder.tex
>> +++ b/memorder/memorder.tex
>> @@ -3980,39 +3980,22 @@ dependencies.
>>  \rowcolors{4}{}{lightgray}
>>  \small
>>  \centering
>> -\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.6in}
>> +\newcommand{\cpufml}[1]{\begin{picture}(6,50)(0,0)\rotatebox{90}{#1}\end{picture}}
>> +\renewcommand*{\arraystretch}{1.2}\OneColumnHSpace{-.35in}
>>  \begin{tabular}{llccccccccc}
>>  	\toprule
>>  	\multicolumn{2}{l}{~} & \multicolumn{9}{c}{CPU Family} \\
>>  	\cmidrule{3-11}
>>  	\multicolumn{2}{c}{\raisebox{.5ex}{Property}}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{Alpha}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{ARMv8}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{ARMv7-A/R}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{Itanium}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{MIPS}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{\Power{}}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{SPARC TSO}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{x86}
>> -	  \end{picture}
>> -	& \begin{picture}(6,60)(0,0)
>> -		\rotatebox{90}{z~Systems}
>> -	  \end{picture}
>> +	& \cpufml{Alpha}
>> +	& \cpufml{ARMv8}
>> +	& \cpufml{ARMv7-A/R}
>> +	& \cpufml{Itanium}
>> +	& \cpufml{MIPS}
>> +	& \cpufml{\Power{}}
>> +	& \cpufml{SPARC TSO}
>> +	& \cpufml{x86}
>> +	& \cpufml{z~Systems}
>>  	\\
>>  	\cmidrule(r){1-2} \cmidrule{3-11}
>>  %		 Alpha ARMv8 ARMv7 Itanium MIPS PPC SPARC x86 z Systems
>> @@ -4070,7 +4053,7 @@ dependencies.
>>  	~ & ~ & C: & Compare-and-exchange instruction \\
>>  	~ & ~ & L: & Load-linked/store-conditional instruction \\
>>  \end{tabular}
>> -}\OneColumnHSpace{-0.7in}
>> +}\OneColumnHSpace{-0.4in}
>>  \caption{Summary of Memory Ordering}
>>  \label{tab:memorder:Summary of Memory Ordering}
>>  \end{table*}
>> @@ -4132,8 +4115,8 @@ instruction cache and pipeline.
>>  Such CPUs require special instructions be executed for self-modifying
>>  code.
>>
>> -Parenthesized CPU names indicate modes that are architecturally allowed,
>> -but rarely used in practice.
>> +%Parenthesized CPU names indicate modes that are architecturally allowed,
>> +%but rarely used in practice.
>>
>>  The common ``just say no'' approach to memory-ordering operations
>>  can be eminently reasonable where it applies,
>> -- 
>> 2.7.4
>>
> 
> 


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

* [PATCH] locking: Use helper macro in Table 7.1
  2017-11-01 14:51 ` Paul E. McKenney
  2017-11-01 15:10   ` Akira Yokosawa
@ 2017-11-01 22:09   ` Akira Yokosawa
  2017-11-01 22:48     ` Paul E. McKenney
  1 sibling, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2017-11-01 22:09 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From af9e5f272a12304067120b79a86d6673b605b7b3 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 2 Nov 2017 07:02:07 +0900
Subject: [PATCH] locking: Use helper macro in Table 7.1

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 locking/locking.tex | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/locking/locking.tex b/locking/locking.tex
index 025320b..12a0240 100644
--- a/locking/locking.tex
+++ b/locking/locking.tex
@@ -1314,28 +1314,17 @@ or even milliseconds.
 \begin{table}
 \renewcommand*{\arraystretch}{1.2}
 \newcommand{\x}{\textcolor{gray!20}{\rule{7pt}{7pt}}}
+\newcommand{\rothead}[1]{\begin{picture}(6,65)(0,0)\rotatebox{90}{#1}\end{picture}}
 \small
 \centering
 \begin{tabular}{lcccccc}
 	\toprule
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Null (Not Held)}
-	  \end{picture}
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Concurrent Read}
-	  \end{picture}
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Concurrent Write}
-	  \end{picture}
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Protected Read}
-	  \end{picture}
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Protected Write}
-	  \end{picture}
-	& \begin{picture}(6,65)(0,0)
-		\rotatebox{90}{Exclusive}
-	  \end{picture}
+	& \rothead{Null (Not Held)}
+	& \rothead{Concurrent Read}
+	& \rothead{Concurrent Write}
+	& \rothead{Protected Read}
+	& \rothead{Protected Write}
+	& \rothead{Exclusive}
 	\\
 %				  NL   CR   CW     PR   PW   EX
 	\cmidrule(r){1-1} \cmidrule{2-7}
-- 
2.7.4



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

* Re: [PATCH] locking: Use helper macro in Table 7.1
  2017-11-01 22:09   ` [PATCH] locking: Use helper macro in Table 7.1 Akira Yokosawa
@ 2017-11-01 22:48     ` Paul E. McKenney
  0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2017-11-01 22:48 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Thu, Nov 02, 2017 at 07:09:26AM +0900, Akira Yokosawa wrote:
> >From af9e5f272a12304067120b79a86d6673b605b7b3 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Thu, 2 Nov 2017 07:02:07 +0900
> Subject: [PATCH] locking: Use helper macro in Table 7.1
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>

Applied, thank you very much!

							Thanx, Paul

> ---
>  locking/locking.tex | 25 +++++++------------------
>  1 file changed, 7 insertions(+), 18 deletions(-)
> 
> diff --git a/locking/locking.tex b/locking/locking.tex
> index 025320b..12a0240 100644
> --- a/locking/locking.tex
> +++ b/locking/locking.tex
> @@ -1314,28 +1314,17 @@ or even milliseconds.
>  \begin{table}
>  \renewcommand*{\arraystretch}{1.2}
>  \newcommand{\x}{\textcolor{gray!20}{\rule{7pt}{7pt}}}
> +\newcommand{\rothead}[1]{\begin{picture}(6,65)(0,0)\rotatebox{90}{#1}\end{picture}}
>  \small
>  \centering
>  \begin{tabular}{lcccccc}
>  	\toprule
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Null (Not Held)}
> -	  \end{picture}
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Concurrent Read}
> -	  \end{picture}
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Concurrent Write}
> -	  \end{picture}
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Protected Read}
> -	  \end{picture}
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Protected Write}
> -	  \end{picture}
> -	& \begin{picture}(6,65)(0,0)
> -		\rotatebox{90}{Exclusive}
> -	  \end{picture}
> +	& \rothead{Null (Not Held)}
> +	& \rothead{Concurrent Read}
> +	& \rothead{Concurrent Write}
> +	& \rothead{Protected Read}
> +	& \rothead{Protected Write}
> +	& \rothead{Exclusive}
>  	\\
>  %				  NL   CR   CW     PR   PW   EX
>  	\cmidrule(r){1-1} \cmidrule{2-7}
> -- 
> 2.7.4
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

end of thread, other threads:[~2017-11-01 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-01 14:27 [PATCH] memorder: Adjust height of Table 15.5's header Akira Yokosawa
2017-11-01 14:51 ` Paul E. McKenney
2017-11-01 15:10   ` Akira Yokosawa
2017-11-01 22:09   ` [PATCH] locking: Use helper macro in Table 7.1 Akira Yokosawa
2017-11-01 22:48     ` Paul E. McKenney

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.