Update code snippets in QQA of defer/rcuapi
cover Update code snippets in QQA of defer/rcuapi
From 3908668ab195e3b0b230eb7a667b03009107ca24 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 18 Dec 2018 23:38:18 +0900
Subject: [PATCH 0/2] Update code snippets in QQA of defer/rcuapi
Hi Paul,
Let's resume updating snippets.
Patch #1 updates a couple of snippets in QQA of defer/rcuapi.tex which I missed prior to the latest release.
Patch #2 is an independent fix to avoid duplicate entries in bibliography.
It turned out that update of code snippets in datastruct requires some enhancement of fcvextract.pl to handle labels of the form "/* \lnlbl{foo} */".
Also, code samples under CodeSamples/datastruct/ have quite a few comment blocks, which should not appear in the resulting code snippets. Putting \fcvexclude for those comment lines would cause the code samples look ugly, so fcvextract.pl should be able to remove them automatically.
I'll submit the update in datastruct once the update of the script becomes ready.
Thanks, Akira
--
Akira Yokosawa (2):
defer/rcuapi: Employ new scheme for snippets in Answers to Quick
Quizzes
memorder: Avoid citing duplicate bib entries
defer/rcuapi.tex | 51 +++++++++++++++++++++------------------------------ memorder/memorder.tex | 2 +- 2 files changed, 22 insertions(+), 31 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 defer/rcuapi: Employ new scheme for snippets in Answers to Quick Quizzes
From 290135eea4ff9f839c48c1ac0dbe4c7adf047e3f Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 15 Dec 2018 22:20:08 +0900
Subject: [PATCH 1/2] defer/rcuapi: Employ new scheme for snippets in Answers to Quick Quizzes
--- defer/rcuapi.tex | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-)
defer/rcuapi.tex +21 -30
@@ -370,22 +370,17 @@ returns a value that must be passed into the corresponding could still result in deadlock. \begin{listing}[htbp] -\scriptsize -{ -\begin{verbbox} - 1 idx = srcu_read_lock(&ssa); - 2 synchronize_srcu(&ssb); - 3 srcu_read_unlock(&ssa, idx); - 4 - 5 /* . . . */ - 6 - 7 idx = srcu_read_lock(&ssb); - 8 synchronize_srcu(&ssa); - 9 srcu_read_unlock(&ssb, idx); -\end{verbbox} -} -\centering -\theverbbox +\begin{VerbatimL} +idx = srcu_read_lock(&ssa); +synchronize_srcu(&ssb); +srcu_read_unlock(&ssa, idx); + +/* . . . */ + +idx = srcu_read_lock(&ssb); +synchronize_srcu(&ssa); +srcu_read_unlock(&ssb, idx); +\end{VerbatimL} \caption{Multistage SRCU Deadlocks} \label{lst:defer:Multistage SRCU Deadlocks} \end{listing}
@@ -622,20 +617,16 @@ dereferences are protected by RCU. Listing~\ref{lst:defer:Diverse RCU Read-Side Nesting}. \begin{listing}[htbp] -{ \scriptsize -\begin{verbbox} - 1 rcu_read_lock(); - 2 preempt_disable(); - 3 p = rcu_dereference(global_pointer); - 4 - 5 /* . . . */ - 6 - 7 preempt_enable(); - 8 rcu_read_unlock(); -\end{verbbox} -} -\centering -\theverbbox +\begin{VerbatimL} +rcu_read_lock(); +preempt_disable(); +p = rcu_dereference(global_pointer); + +/* . . . */ + +preempt_enable(); +rcu_read_unlock(); +\end{VerbatimL} \caption{Diverse RCU Read-Side Nesting} \label{lst:defer:Diverse RCU Read-Side Nesting} \end{listing}
Signature · 1 line
2.7.4
PATCH 2/2 memorder: Avoid citing duplicate bib entries
In reply to Akira YokosawaFrom 3908668ab195e3b0b230eb7a667b03009107ca24 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 15 Dec 2018 22:39:02 +0900
Subject: [PATCH 2/2] memorder: Avoid citing duplicate bib entries
[MDR16a] and [MDR16b] are identical.
Let's consistently use "PaulEMcKenney2016LinuxKernelMMIO".
--- memorder/memorder.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
memorder/memorder.tex +1 -1
@@ -4926,7 +4926,7 @@ defined to be the heavyweight {\tt sync} instruction. However, Linux's \co{smp_wmb()} instruction is never used for MMIO (since a driver must carefully order MMIOs in UP as well as SMP kernels, after all), so it is defined to be the lighter weight -\co{eieio} or \co{lwsync} instruction~\cite{PaulEMcKenney2016MMIO}. +\co{eieio} or \co{lwsync} instruction~\cite{PaulEMcKenney2016LinuxKernelMMIO}. This instruction may well be unique in having a five-vowel mnemonic. The \co{smp_mb()} instruction is also defined to be the {\tt sync} instruction, but both \co{smp_rmb()} and \co{rmb()} are defined to
Signature · 1 line
2.7.4
Quoted 7 lines · Akira Yokosawa
Quoted 1 line
From
3908668ab195e3b0b230eb7a667b03009107ca24Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Tue, 18 Dec 2018 23:38:18 +0900
Subject: [PATCH 0/2] Update code snippets in QQA of defer/rcuapiHi Paul,
Quoted 7 lines
Let's resume updating snippets.
Patch #1 updates a couple of snippets in QQA of defer/rcuapi.tex which I missed prior to the latest release.
Patch #2 is an independent fix to avoid duplicate entries in bibliography.
Applied and pushed, thank you!
Quoted 11 lines
It turned out that update of code snippets in datastruct requires some enhancement of fcvextract.pl to handle labels of the form "/* \lnlbl{foo} */".
Also, code samples under CodeSamples/datastruct/ have quite a few comment blocks, which should not appear in the resulting code snippets. Putting \fcvexclude for those comment lines would cause the code samples look ugly, so fcvextract.pl should be able to remove them automatically.I'll submit the update in datastruct once the update of the script becomes ready.
Very good, looking forward to it!
Thanx, Paul
Quoted 14 lines
Thanks, Akira
--
Akira Yokosawa (2):
defer/rcuapi: Employ new scheme for snippets in Answers to Quick
Quizzes
memorder: Avoid citing duplicate bib entriesdefer/rcuapi.tex | 51 +++++++++++++++++++++------------------------------ memorder/memorder.tex | 2 +- 2 files changed, 22 insertions(+), 31 deletions(-)Signature · 1 line
2.7.4