[PATCH 4/4] toolsoftrade: Add quick quiz on ACCESS_ONCE()

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

 



>From 2f8d163ba1bbcc142e7e5956cf4830e9a34e5551 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Sat, 23 Dec 2017 00:01:49 +0900
Subject: [PATCH 4/4] toolsoftrade: Add quick quiz on ACCESS_ONCE()

Put a brief history of ACCESS_ONCE() in a QQA.
Cite LWN articles on ACCESS_ONCE() and a couple of git commits in
the QQA.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 toolsoftrade/toolsoftrade.tex | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index 855ab61..94ff444 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -1281,6 +1281,23 @@ Listing~\ref{lst:toolsoftrade:Compiler Barrier Primitive (for GCC)}.
 \label{lst:toolsoftrade:Compiler Barrier Primitive (for GCC)}
 \end{listing}
 
+\QuickQuiz{}
+	What happened to \co{ACCESS_ONCE()}?
+\QuickQuizAnswer{
+	\co{ACCESS_ONCE()} is the origin of \co{READ_ONCE()}
+	and \co{WRITE_ONCE()} in the core API of Linux kernel~\cite{
+	JonCorbet2012ACCESS:ONCE,
+	JonathanCorbet2014ACCESS:ONCEcompilerBugs}.
+	It was introduced as a helper in RCU code, but was promoted to
+	core API soon afterward~\cite{
+	PaulEMcKenney2007ACCESS:ONCE:rcu,
+	LinusTorvalds2008ACCESS:ONCE:move}. It has been finally removed
+	in favor of \co{READ_ONCE()} and \co{WRITE_ONCE()} during
+	Linux 4.15 development cycle~\cite{MarkRutland2017ACCESS:ONCE:remove}.
+	Linux kernel's \co{READ_ONCE()} and \co{WRITE_ONCE()} have
+	evolved into complex forms that look quite different.
+} \QuickQuizEnd
+
 \subsection{Atomic Operations (C11)}
 \label{sec:toolsoftrade:Atomic Operations (C11)}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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