Commit 8750dfe6 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

doc: Update NMI-RCU.rst



This commit updates NMI-RCU.rst to highlight the ancient heritage of
the example code and to discourage wanton compiler "optimizations".

Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 43850011
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ Although RCU is usually used to protect read-mostly data structures,
it is possible to use RCU to provide dynamic non-maskable interrupt
it is possible to use RCU to provide dynamic non-maskable interrupt
handlers, as well as dynamic irq handlers.  This document describes
handlers, as well as dynamic irq handlers.  This document describes
how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
work in "arch/x86/kernel/traps.c".
work in an old version of "arch/x86/kernel/traps.c".


The relevant pieces of code are listed below, each followed by a
The relevant pieces of code are listed below, each followed by a
brief explanation::
brief explanation::
@@ -116,7 +116,7 @@ Answer to Quick Quiz:


	This same sad story can happen on other CPUs when using
	This same sad story can happen on other CPUs when using
	a compiler with aggressive pointer-value speculation
	a compiler with aggressive pointer-value speculation
	optimizations.
	optimizations.  (But please don't!)


	More important, the rcu_dereference_sched() makes it
	More important, the rcu_dereference_sched() makes it
	clear to someone reading the code that the pointer is
	clear to someone reading the code that the pointer is