Misc updates and cleanups
cover Misc updates and cleanups
Hi Paul,
This patch set is a collection of updates/cleanups here and there.
Patch 1/5 is a routine update of rcu-test.dat.
Patch 2/5 contains cosmetic changes in formal/dyntickrcu regarding non-breakable spaces.
Patch 3/5 works around missing "awk" command observed in recent fedora-based container images.
Patch 4/5 makes SVG --> PDF conversions more resilient to inkscape crashes observed with an old (and possibly a future) release of inkscape. Patch 5/5 tweaks shrink ratio of tall code snippets for ebook-size builds.
Thanks, Akira
--
Akira Yokosawa (5):
CodeSamples/formal: Update rcu-test.dat for v6.15 formal/dyntickrcu: Add non-breakable spaces around \co{i} and \co{j} docker/Dockerfile.fedora: Add gawk in package list
Makefile: Fall back to rsvg-convert if inkscape crashes toolsoftrade, count: Adjust shrink ratio of tall code snippets for -eb
builds
CodeSamples/formal/data/rcu-test.dat | 3 ++- Makefile | 24 ++++++++++++++---------- count/count.tex | 2 +- docker/Dockerfile.fedora | 2 +- formal/dyntickrcu.tex | 12 ++++++------ toolsoftrade/toolsoftrade.tex | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-)
base-commit: f25caca80f576d06c14c23aaca673528163ca0b9
Signature · 1 line
2.43.0
PATCH 1/5 CodeSamples/formal: Update rcu-test.dat for v6.15
--- CodeSamples/formal/data/rcu-test.dat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
CodeSamples/formal/data/rcu-test.dat +2 -1
@@ -101,4 +101,5 @@ v6.8 22018 12071 34089 35.4 "" 22676 12095 34771 34.8 v6.12 22834 12313 35147 35.0 "" 22961 12414 35375 35.1 -v6.14 22107 12620 34727 36.3 +"" 22107 12620 34727 36.3 +v6.15 22300 12758 35058 36.4
Signature · 1 line
2.43.0
PATCH 2/5 formal/dyntickrcu: Add non-breakable spaces around \co{i} and \co{j}
In reply to Akira YokosawaProtect single-letter variables "i" and "j" from unfortunate line/column/page breaks such as:
... loop counter
i has exceeded ...
and:
..., so that i
counts entries ...
, so that they can be rendered as:
... loop counter i
has exceeded ...
and:
..., so that
i counts entries ...
, instead.
--- formal/dyntickrcu.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
formal/dyntickrcu.tex +6 -6
@@ -469,7 +469,7 @@ a loop as follows: \begin{fcvref}[ln:formal:promela:dyntick:dyntickRCU-base:dyntick_nohz] \Clnref{do,od} define a loop. -\Clnref{break} exits the loop once the loop counter \co{i} +\Clnref{break} exits the loop once the loop counter~\co{i} has exceeded the limit \co{MAX_DYNTICK_LOOP_NOHZ}. \Clnref{kick_loop} tells the loop construct to execute \clnrefrange{ex_inc:b}{inc_i}
@@ -1003,15 +1003,15 @@ the loop in \co{dyntick_irq()} as follows: \begin{fcvref}[ln:formal:promela:dyntick:dyntickRCU-irq-ssl:dyntick_irq] This is similar to the earlier \co{dynticks_irq()} process. -It adds a second counter variable \co{j} on \clnref{j}, so that -\co{i} counts entries to interrupt handlers and \co{j} -counts exits. +It adds a second counter variable~\co{j} on \clnref{j}, so that +\co{i}~counts entries to interrupt handlers and \co{j}~counts +exits. The \co{outermost} variable on \clnref{om} helps determine when the \co{grace_period_state} variable needs to be sampled for the safety checks. The loop-exit check on \clnref{chk_ex:b,chk_ex:e} is updated to require that the specified number of interrupt handlers are exited as well as entered, -and the increment of \co{i} is moved to \clnref{inc_i}, which is +and the increment of~\co{i} is moved to \clnref{inc_i}, which is the end of the interrupt-entry model. \Clnrefrange{atm1:b}{atm1:e} set the \co{outermost} variable to indicate whether this is the outermost of a set of nested interrupts and to
@@ -1026,7 +1026,7 @@ legal to exit another interrupt. \Clnrefrange{atm3:b}{atm3:e} check the safety criterion, but only if we are exiting from the outermost interrupt level. -Finally, \clnrefrange{atm4:b}{atm4:e} increment the interrupt-exit count \co{j} +Finally, \clnrefrange{atm4:b}{atm4:e} increment the interrupt-exit count~\co{j} and, if this is the outermost interrupt level, clears \co{in_dyntick_irq}. \end{fcvref}
Signature · 1 line
2.43.0
PATCH 3/5 docker/Dockerfile.fedora: Add gawk in package list
In reply to Akira YokosawaFedora base container images stopped providing the awk command due to the change in krb5-libs dependency [1].
perfbook's Makefile uses awk in checking rsvg-convert version. Without awk, rsvg-convert is not used as a preferred converter.
Add gawk in the list of packages to be installed.
--- docker/Dockerfile.fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docker/Dockerfile.fedora +1 -1
@@ -5,7 +5,7 @@ ARG rel=latest FROM fedora:$rel RUN dnf -y update && dnf install -y --setopt=tsflags=nodocs \ - fig2ps graphviz inkscape make git vim nano gnuplot-minimal groff time \ + fig2ps graphviz inkscape make git vim nano gawk gnuplot-minimal groff time \ liberation-fonts dejavu-fonts-all poppler-utils librsvg2-tools \ texlive-collection-plaingeneric texlive-collection-binextra \ texlive-collection-latexextra texlive-epstopdf texlive-fontools \
Signature · 1 line
2.43.0
PATCH 4/5 Makefile: Fall back to rsvg-convert if inkscape crashes
In reply to Akira YokosawaUnder Ubuntu 20.04, whose inkscape is version 0.92.5, conversion of cpu/SimpleWrite.svg --> .pdf fails with a crashing message from inkscape, "Error 134".
Ubuntu 20.04's rsvg-convert accepts the SVG and generates a good-looking PDF from it.
Although using such an old rsvg-convert might end up in a poor looking PDF, it is much better than ending up in a fatal build error. Add fallback commands to run rsvg-convert in case of such crashes.
Add the same fallback to modern version of inkscape. This can mitigate potential instability of inkscape run as a CLI tool, similar to the one commit f307e19f2be0 ("Prevent inkscape from interacting with desktop manager") had worked around.
Rather than cluttering the recipe with additional ifdef's, define a macro SVG_TO_PDF_COMMAND beforehand and use it in the recipe.
---
I have no idea what's wrong in SimpleWrite.svg against the old inkscape at the moment.
--- Makefile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
Makefile +14 -10
@@ -498,6 +498,19 @@ endif sh plot.sh && \ cd ../../.. +ifdef RSVG_CONVERT + FALLBACK_RSVG_CONVERT = || (cat $<i | rsvg-convert $(RSVG_FMT_OPT) > $@ && echo "$< --> $(suffix $@) (fallback rsvg-convert)") +endif +ifeq ($(RSVG_CONVERT_GOOD),1) + SVG_TO_PDF_COMMAND = cat $<i | rsvg-convert $(RSVG_FMT_OPT) > $@ +else + ifeq ($(INKSCAPE_ONE),0) + SVG_TO_PDF_COMMAND = inkscape --export-pdf=$@ $<i > /dev/null 2>&1 $(FALLBACK_RSVG_CONVERT) + else + SVG_TO_PDF_COMMAND = $(ISOLATE_INKSCAPE) inkscape -o $@ $<i > /dev/null 2>&1 $(FALLBACK_RSVG_CONVERT) + endif +endif + $(PDFTARGETS_OF_SVG): $(FIXSVGFONTS) $(PDFTARGETS_OF_SVG): %.pdf: %.svg @echo "$< --> $(suffix $@) $(SVG_PDF_CONVERTER)"
@@ -529,16 +542,7 @@ endif ifeq ($(RECOMMEND_LIBERATIONMONO),1) $(info Nice-to-have font family 'Liberation Mono' not found. See #9 in FAQ-BUILD.txt) endif - -ifeq ($(RSVG_CONVERT_GOOD),1) - @cat $<i | rsvg-convert $(RSVG_FMT_OPT) > $@ -else - ifeq ($(INKSCAPE_ONE),0) - @inkscape --export-pdf=$@ $<i > /dev/null 2>&1 - else - @$(ISOLATE_INKSCAPE) inkscape -o $@ $<i > /dev/null 2>&1 - endif -endif + @$(SVG_TO_PDF_COMMAND) @rm -f $<i ifeq ($(chkpagegroup),on) ifndef QPDF
Signature · 1 line
2.43.0
PATCH 5/5 toolsoftrade, count: Adjust shrink ratio of tall code snippets for -eb builds
In reply to Akira YokosawaThese two code snippets have become shorter than earlier. Adjust their shrink ratio so that they can enjoy ebook's page size.
--- count/count.tex | 2 +- toolsoftrade/toolsoftrade.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
count/count.tex +1 -1
@@ -997,7 +997,7 @@ converge on the true value---hence this approach qualifies as eventually consistent. \begin{listing} -\ebresizeverb{.9}{\input{CodeSamples/count/[email protected]}} +\ebresizeverb{1.0}{\input{CodeSamples/count/[email protected]}} \caption{Array-Based Per-Thread Eventually Consistent Counters} \label{lst:count:Array-Based Per-Thread Eventually Consistent Counters} \end{listing}
toolsoftrade/toolsoftrade.tex +1 -1
@@ -479,7 +479,7 @@ lock~\cite{Hoare74}. }\QuickQuizEnd \begin{listing} -\ebresizeverb{.85}{ +\ebresizeverb{.91}{ \input{CodeSamples/toolsoftrade/lock@reader_writer.fcv} } \caption{Demonstration of Exclusive Locks}
Signature · 1 line
2.43.0
Paul E. McKenney
AppliedQuoted 4 lines · Akira Yokosawa
Hi Paul,
This patch set is a collection of updates/cleanups here and there.
Quoted 8 lines
Patch 1/5 is a routine update of rcu-test.dat.
Patch 2/5 contains cosmetic changes in formal/dyntickrcu regarding non-breakable spaces.
Patch 3/5 works around missing "awk" command observed in recent fedora-based container images.
Patch 4/5 makes SVG --> PDF conversions more resilient to inkscape crashes observed with an old (and possibly a future) release of inkscape. Patch 5/5 tweaks shrink ratio of tall code snippets for ebook-size builds.
Queued and pushed, thank you very much!
Thanx, Paul
Quoted 23 lines
Thanks, Akira
--
Akira Yokosawa (5):
CodeSamples/formal: Update rcu-test.dat for v6.15 formal/dyntickrcu: Add non-breakable spaces around \co{i} and \co{j} docker/Dockerfile.fedora: Add gawk in package list
Makefile: Fall back to rsvg-convert if inkscape crashes toolsoftrade, count: Adjust shrink ratio of tall code snippets for -eb
buildsCodeSamples/formal/data/rcu-test.dat | 3 ++- Makefile | 24 ++++++++++++++---------- count/count.tex | 2 +- docker/Dockerfile.fedora | 2 +- formal/dyntickrcu.tex | 12 ++++++------ toolsoftrade/toolsoftrade.tex | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-)base-commit:
f25caca80f576d06c14c23aaca673528163ca0b9Signature · 1 line
2.43.0