Misc updates
cover Misc updates
From 5471262067bf42e8698c80fee3e1d42a8c576d43 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 5 Dec 2018 00:10:12 +0900
Subject: [PATCH 0/4] Misc updates
Hi Paul,
As I reported this September, Figure 5.1 is not complete yet. As a workaround, patches #1 and #2 restores the old plot of Nehalem for Figure 5.1. Once we can obtain complete data, it should be easy to update again.
Patch #3 is a minor tweak in RCU code snippets to prevent short code snippets from being page/column broken.
Patch #4 fixes a typo in an epigraph you've added recently.
Hopefully, this would be a final patch set from me for the upcoming release.
Thanks, Akira
--
Akira Yokosawa (4):
CodeSamples/count: Restore atomic125.eps
count: Restore 'fig:count:Atomic Increment Scalability on Nehalem'
defer: Prevent page/column break in short inline code snippets
owned: Fix typo in epigraph
CodeSamples/count/atomic125.eps | 856 +++++++------ CodeSamples/count/atomic125.png | Bin 3189 -> 3337 bytes CodeSamples/count/atomic_nehalem.eps | 2266 ++++++++++++++++++++++++++++++++++ count/count.tex | 14 +- defer/rcufundamental.tex | 14 +- defer/rcuintro.tex | 4 +- locking/locking.tex | 2 +- owned/owned.tex | 2 +- 8 files changed, 2770 insertions(+), 388 deletions(-) create mode 100644 CodeSamples/count/atomic_nehalem.eps
Signature · 1 line
2.7.4
PATCH 1/4 CodeSamples/count: Restore atomic125.eps
From 01e55591da491ee4b42839383b567e98f051285c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 4 Dec 2018 23:34:53 +0900
Subject: [PATCH 1/4] CodeSamples/count: Restore atomic125.eps
Commit 3b62f67a76e1 ("Regenerating the atomic counter graph on a more modern CPU") accidentally overwrote atomic125.eps. Restore it and restore old atomic.eps (of Nehalem) as atomic_nehalem.eps.
Also restore .png files.
--- CodeSamples/count/atomic125.eps | 856 +++++++------ CodeSamples/count/atomic125.png | Bin 3189 -> 3337 bytes CodeSamples/count/atomic_nehalem.eps | 2266 ++++++++++++++++++++++++++++++++++ 3 files changed, 2752 insertions(+), 370 deletions(-) create mode 100644 CodeSamples/count/atomic_nehalem.eps
CodeSamples/count/atomic125.eps +486 -370
@@ -1,7 +1,7 @@ %!PS-Adobe-2.0 %%Title: Is Parallel Programming Hard, And, If So, What Can You Do About It? -%%Creator: gnuplot 5.0 patchlevel 3 -%%CreationDate: Mon Jul 16 22:02:17 2018 +%%Creator: gnuplot 4.4 patchlevel 0 +%%CreationDate: Wed Jan 5 07:20:51 2011 %%DocumentFonts: (atend) %%BoundingBox: 50 95 302 355 %%Orientation: Portrait
@@ -20,29 +20,42 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def -/Level3 false def /Rounded false def /ClipToBoundingBox false def -/SuppressPDFMark false def /TransparentPatterns false def /gnulinewidth 5.000 def /userlinewidth gnulinewidth def /Gamma 1.0 def -/BackgroundColor {-1.000 -1.000 -1.000} def % /vshift -33 def /dl1 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def /vpt_ 31.5 def /hpt hpt_ def /vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (Is Parallel Programming Hard, And, If So, What Can You Do About It?) + /Subject (gnuplot plot) + /Creator (gnuplot 4.4 patchlevel 0) + /Author (paulmck) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Wed Jan 5 07:20:51 2011) + /DOCINFO pdfmark +end +} ifelse /doclip { ClipToBoundingBox { newpath 50 50 moveto 302 50 lineto 302 410 lineto 50 410 lineto closepath
@@ -50,7 +63,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 5.1 (Oct 2015) +% Gnuplot Prolog Version 4.4 (January 2010) % %/SuppressPDFMark true def %
@@ -62,16 +75,15 @@ gnudict begin /Z {closepath} bind def /C {setrgbcolor} bind def /f {rlineto fill} bind def -/g {setgray} bind def /Gshow {show} def % May be redefined later in the file to support UTF-8 /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
@@ -84,8 +96,7 @@ gnudict begin dup 1 lt {pop 1} if 10 mul /udl exch def} def /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def -3.8 setmiterlimit -% Classic Line colors (version 5.0) +% Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def
@@ -98,21 +109,19 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default dash patterns (version 5.0) -/LTB {BL [] LCb DL} def +% Default Line Types /LTw {PL [] 1 setgray} def -/LTb {PL [] LCb DL} def +/LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [2 dl1 3 dl2] LC1 DL} def -/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def -/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def -/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [4 dl1 2 dl2] LC5 DL} def -/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def -/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def -/SL {[] 0 setdash} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V
@@ -319,8 +328,7 @@ gnudict begin /PatternFill {gsave /PFa [ 9 2 roll ] def PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec - TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse - clip + gsave 1 setgray fill grestore clip currentlinewidth 0.5 mul setlinewidth /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def 0 0 M PFa 5 get rotate PFs -2 div dup translate
@@ -334,14 +342,9 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse -dup 2 lt - {/InterpretLevel1 true def - /InterpretLevel3 false def} - {/InterpretLevel1 Level1 def - 2 gt - {/InterpretLevel3 Level3 def} - {/InterpretLevel3 false def} - ifelse } + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions
@@ -430,17 +433,16 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop -% /MFshow { { dup 5 get 3 ge { 5 get 3 eq {gsave} {grestore} ifelse } {dup dup 0 get findfont exch 1 get scalefont setfont [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6 - get exch 4 get {textshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq + get exch 4 get {Gshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5 get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get - textshow 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop + show 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop pop aload pop M} ifelse }ifelse }ifelse } ifelse } forall} def
@@ -1848,51 +1850,6 @@ ba6d2a8e73b10c6de72a8e8f3bfeab8344fe6622fadd5d01457e31e8facd74cb cleartomark {restore}if %%EndProcSet -Level1 SuppressPDFMark or -{} { -/SDict 10 dict def -systemdict /pdfmark known not { - userdict /pdfmark systemdict /cleartomark get put -} if -SDict begin [ - /Title (Is Parallel Programming Hard, And, If So, What Can You Do About It?) - /Subject (gnuplot plot) - /Creator (gnuplot 5.0 patchlevel 3) - /Author (imre) -% /Producer (gnuplot) -% /Keywords () - /CreationDate (Mon Jul 16 22:02:17 2018) - /DOCINFO pdfmark -end -} ifelse -% -% Support for boxed text - Ethan A Merritt May 2005 -% -/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put - userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put - /Boxing true def } def -/ExtendTextBox { Boxing - { gsave dup false charpath pathbbox - dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse - dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse - dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse - dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse - grestore } if } def -/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M - TBx1 TBxmargin sub TBy2 TBymargin add L - TBx2 TBxmargin add TBy2 TBymargin add L - TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def -/DrawTextBox { PopTextBox stroke /Boxing false def} def -/FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def -0 0 0 0 InitTextBox -/TBxmargin 20 def -/TBymargin 20 def -/Boxing false def -/textshow { ExtendTextBox Gshow } def -% -% redundant definitions for compatibility with prologue.ps older than 5.0.2 -/LTB {BL [] LCb DL} def -/LTb {PL [] LCb DL} def end %%EndProlog %%Page: 1 1
@@ -1904,436 +1861,595 @@ doclip 0 setgray newpath (NimbusSanL-Regu) findfont 100 scalefont setfont -BackgroundColor 0 lt 3 1 roll 0 lt exch 0 lt or or not {gsave BackgroundColor C clippath fill grestore} if 1.000 UL LTb -LCb setrgbcolor -490 975 M +670 1050 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 975 M +610 1050 M [ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 0)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 1181 M +670 1239 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 1181 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 20)] +610 1239 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 5000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 1386 M +670 1428 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 1386 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 40)] +610 1428 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 10000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 1592 M +670 1617 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 1592 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 60)] +610 1617 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 15000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 1797 M +670 1806 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 1797 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 80)] +610 1806 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 20000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 2003 M +670 1994 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 2003 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 100)] +610 1994 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 25000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 2208 M +670 2183 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 2208 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 120)] +610 2183 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 30000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 2414 M +670 2372 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 2414 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 140)] +610 2372 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 35000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 2619 M +670 2561 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 2619 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 160)] +610 2561 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 40000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 2825 M +670 2750 M 63 0 V -1786 0 R +1636 0 R -63 0 V stroke -430 2825 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 180)] +610 2750 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 45000)] ] -33.3 MRshow 1.000 UL LTb -LCb setrgbcolor -490 975 M +670 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -490 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 1)] +670 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 0)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -754 975 M +913 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -754 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 2)] +913 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 20)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -1018 975 M +1155 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -1018 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 3)] +1155 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 40)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -1282 975 M +1398 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -1282 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 4)] +1398 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 60)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -1547 975 M +1641 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -1547 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 5)] +1641 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 80)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -1811 975 M +1884 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -1811 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 6)] +1884 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 100)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -2075 975 M +2126 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -2075 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 7)] +2126 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 120)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -2339 975 M +2369 1050 M 0 63 V -0 1787 R +0 1637 R 0 -63 V stroke -2339 875 M -[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 8)] +2369 950 M +[ [(NimbusSanL-Regu) 100.0 0.0 true true 0 ( 140)] ] -33.3 MCshow 1.000 UL LTb -LCb setrgbcolor -1.000 UL -LTB -LCb setrgbcolor -490 2825 N -490 975 L -1849 0 V -0 1850 V --1849 0 V -Z stroke -1.000 UP 1.000 UL LTb +670 2750 N +0 -1700 V +1699 0 V +0 1700 V +-1699 0 V +Z stroke LCb setrgbcolor -LCb setrgbcolor -80 1900 M +140 1900 M currentpoint gsave translate -270 rotate 0 0 moveto [ [(NimbusSanL-Regu) 100.0 0.0 true true 0 (Time Per Increment \(ns\))] ] -33.3 MCshow grestore LTb LCb setrgbcolor -1414 725 M +1519 800 M [ [(NimbusSanL-Regu) 100.0 0.0 true true 0 (Number of CPUs \(Threads\))] ] -33.3 MCshow LTb -% Begin plot #1 1.000 UP 1.000 UL LTb -LCb setrgbcolor +% Begin plot #1 +1.000 UP +1.000 UL +LT0 /NimbusSanL-Regu findfont 100 scalefont setfont -/vshift -33 def -490 1019 M -0 10 V -0 -10 R -31 0 V --31 10 R -31 0 V -233 335 R -0 28 V --31 -28 R -62 0 V --62 28 R -62 0 V -233 102 R -0 112 V -987 1494 M -62 0 V --62 112 R -62 0 V -233 3 R -0 199 V --31 -199 R -62 0 V --62 199 R -62 0 V -234 69 R -0 133 V --31 -133 R -62 0 V --62 133 R -62 0 V -233 -1 R -0 241 V --31 -241 R -62 0 V --62 241 R -62 0 V -233 -56 R -0 238 V --31 -238 R -62 0 V --62 238 R -62 0 V -233 63 R -0 200 V --31 -200 R -31 0 V --31 200 R -31 0 V -490 1023 Pls -754 1378 Pls -1018 1569 Pls -1282 1696 Pls -1547 1934 Pls -1811 2119 Pls -2075 2300 Pls -2339 2625 Pls +682 1051 M +0 1 V +-31 -1 R +62 0 V +-62 1 R +62 0 V +18 12 R +0 3 V +-31 -3 R +62 0 V +-62 3 R +62 0 V +17 12 R +0 6 V +-31 -6 R +62 0 V +-62 6 R +62 0 V +18 20 R +0 6 V +-31 -6 R +62 0 V +-62 6 R +62 0 V +17 27 R +0 9 V +-31 -9 R +62 0 V +-62 9 R +62 0 V +18 32 R +0 12 V +-31 -12 R +62 0 V +-62 12 R +62 0 V +17 26 R +0 14 V +-31 -14 R +62 0 V +-62 14 R +62 0 V +18 32 R +0 30 V +-31 -30 R +62 0 V +-62 30 R +62 0 V +17 29 R +0 46 V +-31 -46 R +62 0 V +-62 46 R +62 0 V +18 6 R +0 45 V +-31 -45 R +62 0 V +-62 45 R +62 0 V +18 42 R +0 48 V +-31 -48 R +62 0 V +-62 48 R +62 0 V +17 24 R +0 39 V +-31 -39 R +62 0 V +-62 39 R +62 0 V +18 22 R +0 58 V +-31 -58 R +62 0 V +-62 58 R +62 0 V +17 24 R +0 32 V +-31 -32 R +62 0 V +-62 32 R +62 0 V +18 29 R +0 82 V +-31 -82 R +62 0 V +-62 82 R +62 0 V +17 -33 R +0 74 V +-31 -74 R +62 0 V +-62 74 R +62 0 V +18 -5 R +0 79 V +-31 -79 R +62 0 V +-62 79 R +62 0 V +17 -13 R +0 83 V +-31 -83 R +62 0 V +stroke 1538 1921 M +-62 83 R +62 0 V +18 -32 R +0 72 V +-31 -72 R +62 0 V +-62 72 R +62 0 V +17 -12 R +0 85 V +-31 -85 R +62 0 V +-62 85 R +62 0 V +18 -31 R +0 55 V +-31 -55 R +62 0 V +-62 55 R +62 0 V +18 -12 R +0 107 V +-31 -107 R +62 0 V +-62 107 R +62 0 V +17 -48 R +0 81 V +-31 -81 R +62 0 V +-62 81 R +62 0 V +18 -31 R +0 69 V +-31 -69 R +62 0 V +-62 69 R +62 0 V +17 -36 R +0 90 V +-31 -90 R +62 0 V +-62 90 R +62 0 V +18 -51 R +0 79 V +-31 -79 R +62 0 V +-62 79 R +62 0 V +17 0 R +0 47 V +-31 -47 R +62 0 V +-62 47 R +62 0 V +18 -221 R +0 217 V +-31 -217 R +62 0 V +-62 217 R +62 0 V +17 31 R +0 83 V +-31 -83 R +62 0 V +-62 83 R +62 0 V +18 -291 R +0 304 V +-31 -304 R +62 0 V +-62 304 R +62 0 V +17 -44 R +0 104 V +-31 -104 R +62 0 V +-62 104 R +62 0 V +18 -16 R +0 73 V +-31 -73 R +62 0 V +-62 73 R +62 0 V +682 1052 Pls +731 1066 Pls +779 1081 Pls +828 1108 Pls +876 1143 Pls +925 1185 Pls +973 1224 Pls +1022 1276 Pls +1070 1339 Pls +1119 1404 Pls +1168 1479 Pls +1216 1548 Pls +1265 1630 Pls +1313 1690 Pls +1362 1764 Pls +1410 1823 Pls +1459 1888 Pls +1507 1969 Pls +1556 2005 Pls +1604 2071 Pls +1653 2123 Pls +1702 2171 Pls +1750 2223 Pls +1799 2276 Pls +1847 2336 Pls +1896 2353 Pls +1944 2416 Pls +1993 2352 Pls +2041 2515 Pls +2090 2453 Pls +2138 2572 Pls +2187 2650 Pls % End plot #1 % Begin plot #2 1.000 UL -LTb LT1 -LCb setrgbcolor /NimbusSanL-Regu findfont 100 scalefont setfont -490 1023 M -264 355 V -264 191 V -264 127 V -265 238 V -264 185 V -264 181 V -264 325 V +682 1052 M +49 14 V +48 15 V +49 27 V +48 35 V +49 42 V +48 39 V +49 52 V +48 63 V +49 65 V +49 75 V +48 69 V +49 82 V +48 60 V +49 74 V +48 59 V +49 65 V +48 81 V +49 36 V +48 66 V +49 52 V +49 48 V +48 52 V +49 53 V +48 60 V +49 17 V +48 63 V +49 -64 V +48 163 V +49 -62 V +48 119 V +49 78 V % End plot #2 % Begin plot #3 stroke -LTb LT2 -LCb setrgbcolor /NimbusSanL-Regu findfont 100 scalefont setfont -490 1066 M -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V -19 0 V -18 0 V -19 0 V +682 1050 M +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V +15 0 V +15 0 V +16 0 V +15 0 V +15 0 V % End plot #3 stroke -2.000 UL LTb -LCb setrgbcolor -1.000 UL -LTB -LCb setrgbcolor -490 2825 N -490 975 L -1849 0 V -0 1850 V --1849 0 V +670 2750 N +0 -1700 V +1699 0 V +0 1700 V +-1699 0 V Z stroke 1.000 UP 1.000 UL LTb -LCb setrgbcolor stroke grestore end
CodeSamples/count/atomic125.png binary +0 -0
CodeSamples/count/atomic_nehalem.eps new file +2266 -0
1,900 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
PATCH 2/4 count: Restore 'fig:count:Atomic Increment Scalability on Nehalem'
In reply to Akira YokosawaFrom ae18c92aaee6e3212df302294131eca14a4bba4e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 4 Dec 2018 23:40:20 +0900
Subject: [PATCH 2/4] count: Restore 'fig:count:Atomic Increment Scalability on Nehalem'
Current "fig:count:Atomic Increment Scalability on Kaby Lake" has wrong dashed graph of ideal case. Restore old plot of Nehalem for the moment.
--- count/count.tex | 14 +++++++------- defer/rcuintro.tex | 2 +- locking/locking.tex | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
count/count.tex +7 -7
@@ -248,9 +248,9 @@ accuracies far greater than 50\,\% are almost always necessary. \begin{figure}[tb] \centering -\resizebox{2.5in}{!}{\includegraphics{CodeSamples/count/atomic}} -\caption{Atomic Increment Scalability on Kaby Lake} -\label{fig:count:Atomic Increment Scalability on Kaby Lake} +\resizebox{2.5in}{!}{\includegraphics{CodeSamples/count/atomic_nehalem}} +\caption{Atomic Increment Scalability on Nehalem} +\label{fig:count:Atomic Increment Scalability on Nehalem} \end{figure} The straightforward way to count accurately is to use atomic operations,
@@ -281,7 +281,7 @@ This poor performance should not be a surprise, given the discussion in Chapter~\ref{chp:Hardware and its Habits}, nor should it be a surprise that the performance of atomic increment gets slower as the number of CPUs and threads increase, as shown in -Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake}. +Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem}. In this figure, the horizontal dashed line resting on the x~axis is the ideal performance that would be achieved by a perfectly scalable algorithm: with such an algorithm, a given
@@ -350,7 +350,7 @@ global variable, the cache line containing that variable must circulate among all the CPUs, as shown by the red arrows. Such circulation will take significant time, resulting in the poor performance seen in -Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake}, +Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem}, which might be thought of as shown in Figure~\ref{fig:count:Waiting to Count}.
@@ -2870,7 +2870,7 @@ courtesy of eventual consistency. ``Use the right tool for the job.'' As can be seen from - Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake}, + Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem}, single-variable atomic increment need not apply for any job involving heavy use of parallel updates. In contrast, the algorithms shown in
@@ -3156,7 +3156,7 @@ Summarizing the summary: \item Different levels of performance and scalability will affect algorithm and data-structure design, as do a large number of other factors. - Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake} + Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem} illustrates this point: Atomic increment might be completely acceptable for a two-CPU system, but be completely inadequate for an eight-CPU system.
defer/rcuintro.tex +1 -1
@@ -76,7 +76,7 @@ the figure. But how can we tell when the readers are finished? It is tempting to consider a reference-counting scheme, but -Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake} +Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem} in Chapter~\ref{chp:Counting} shows that this can also result in long delays, just as can
locking/locking.tex +1 -1
@@ -1534,7 +1534,7 @@ Either way, line~\lnref{rel2} releases the root \co{rcu_node} structure's but only for relatively small numbers of CPUs. To see why it is problematic in systems with many hundreds of CPUs, look at - Figure~\ref{fig:count:Atomic Increment Scalability on Kaby Lake} + Figure~\ref{fig:count:Atomic Increment Scalability on Nehalem} and extrapolate the delay from eight to 1,000 CPUs. } \QuickQuizEnd
Signature · 1 line
2.7.4
PATCH 3/4 defer: Prevent page/column break in short inline code snippets
In reply to Akira YokosawaFrom 23fca971d1fe94d7c3e1dd94ea9818e397056e10 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 4 Dec 2018 23:40:56 +0900
Subject: [PATCH 3/4] defer: Prevent page/column break in short inline code snippets
Put "samepage=true" option to such VerbatimN snippets.
--- defer/rcufundamental.tex | 14 +++++++------- defer/rcuintro.tex | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-)
defer/rcufundamental.tex +7 -7
@@ -112,7 +112,7 @@ We therefore encapsulate them into a primitive \co{rcu_assign_pointer()} that has publication semantics. The last four lines would then be as follows: -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] p->a = 1; p->b = 2; p->c = 3;
@@ -128,7 +128,7 @@ However, it is not sufficient to only enforce ordering at the updater, as the reader must enforce proper ordering as well. Consider for example the following code fragment: -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] p = gp; if (p != NULL) { do_something_with(p->a, p->b, p->c);
@@ -163,7 +163,7 @@ directives are required for this purpose:\footnote{ \co{memory_order_acquire}, thus emitting a needless memory-barrier instruction on weakly ordered systems.)} -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] rcu_read_lock(); p = rcu_dereference(gp); if (p != NULL) {
@@ -257,7 +257,7 @@ instance from executing concurrently with RCU readers. Subscribing to an RCU-protected list is straightforward: -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] rcu_read_lock(); list_for_each_entry_rcu(p, head, list) { do_something_with(p->a, p->b, p->c);
@@ -340,7 +340,7 @@ mechanism, for example, a lock. Subscribing to an RCU-protected hlist is also similar to the circular list: -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] rcu_read_lock(); hlist_for_each_entry_rcu(p, head, list) { do_something_with(p->a, p->b, p->c);
@@ -544,7 +544,7 @@ to read as follows: \end{lineref} \begin{linelabel}[ln:defer:RCU Deletion From Linked List] -\begin{VerbatimN}[commandchars=\\\[\]] +\begin{VerbatimN}[samepage=true,commandchars=\\\[\]] p = search(head, key); if (p != NULL) { list_del_rcu(&p->list); \lnlbl[del_rcu]
@@ -623,7 +623,7 @@ example shown in Listing~\ref{lst:defer:Canonical RCU Replacement Example}: \begin{linelabel}[ln:defer:Canonical RCU Replacement Example (2nd)] -\begin{VerbatimN}[commandchars=\\\[\],firstnumber=15] +\begin{VerbatimN}[samepage=true,commandchars=\\\[\],firstnumber=15] q = kmalloc(sizeof(*p), GFP_KERNEL); \lnlbl[kmalloc] *q = *p; \lnlbl[copy] q->b = 2; \lnlbl[update1]
defer/rcuintro.tex +1 -1
@@ -146,7 +146,7 @@ with time advancing from the top of the figure to the bottom. Although production-quality implementations of this approach can be quite complex, a toy implementation is exceedingly simple: -\begin{VerbatimN} +\begin{VerbatimN}[samepage=true] for_each_online_cpu(cpu) run_on(cpu); \end{VerbatimN}
Signature · 1 line
2.7.4
PATCH 4/4 owned: Fix typo in epigraph
In reply to Akira YokosawaFrom 5471262067bf42e8698c80fee3e1d42a8c576d43 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 4 Dec 2018 23:42:11 +0900
Subject: [PATCH 4/4] owned: Fix typo in epigraph
--- owned/owned.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
owned/owned.tex +1 -1
@@ -253,7 +253,7 @@ page~\pageref{lst:count:Signal-Theft Limit Counter Subtract Function}). \section{Designated Thread} \label{sec:owned:Designated Thread} % -\epigraph{Let a man practice the professiong which he best knows.} +\epigraph{Let a man practice the profession which he best knows.} {\emph{Cicero}} The earlier sections describe ways of allowing each thread to keep its
Signature · 1 line
2.7.4
Quoted 12 lines · Akira Yokosawa
Quoted 1 line
From
5471262067bf42e8698c80fee3e1d42a8c576d43Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Wed, 5 Dec 2018 00:10:12 +0900
Subject: [PATCH 0/4] Misc updatesHi Paul,
As I reported this September, Figure 5.1 is not complete yet. As a workaround, patches #1 and #2 restores the old plot of Nehalem for Figure 5.1. Once we can obtain complete data, it should be easy to update again.
Quoted 7 lines
Patch #3 is a minor tweak in RCU code snippets to prevent short code snippets from being page/column broken.
Patch #4 fixes a typo in an epigraph you've added recently.
Hopefully, this would be a final patch set from me for the upcoming release.
Applied and pushed, thank you! And good point, and same for me -- no more commits authored by me (except for minor fixes) until the release. Of course, I also welcome minor fixes from others. Large changes are also still welcome, but I will instead add them to a branch to be merged afterthe release.
Thanx, Paul
Quoted 22 lines
Thanks, Akira
--
Akira Yokosawa (4):
CodeSamples/count: Restore atomic125.eps
count: Restore 'fig:count:Atomic Increment Scalability on Nehalem'
defer: Prevent page/column break in short inline code snippets
owned: Fix typo in epigraphCodeSamples/count/atomic125.eps | 856 +++++++------ CodeSamples/count/atomic125.png | Bin 3189 -> 3337 bytes CodeSamples/count/atomic_nehalem.eps | 2266 ++++++++++++++++++++++++++++++++++ count/count.tex | 14 +- defer/rcufundamental.tex | 14 +- defer/rcuintro.tex | 4 +- locking/locking.tex | 2 +- owned/owned.tex | 2 +- 8 files changed, 2770 insertions(+), 388 deletions(-) create mode 100644 CodeSamples/count/atomic_nehalem.epsSignature · 1 line
2.7.4