Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Paul E. McKenney <paulmck@kernel.org>

+2 -2
+2 -2
Documentation/RCU/NMI-RCU.rst
··· 8 8 it is possible to use RCU to provide dynamic non-maskable interrupt 9 9 handlers, as well as dynamic irq handlers. This document describes 10 10 how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer 11 - work in "arch/x86/kernel/traps.c". 11 + work in an old version of "arch/x86/kernel/traps.c". 12 12 13 13 The relevant pieces of code are listed below, each followed by a 14 14 brief explanation:: ··· 116 116 117 117 This same sad story can happen on other CPUs when using 118 118 a compiler with aggressive pointer-value speculation 119 - optimizations. 119 + optimizations. (But please don't!) 120 120 121 121 More important, the rcu_dereference_sched() makes it 122 122 clear to someone reading the code that the pointer is