summaryrefslogtreecommitdiff
path: root/Documentation/locking/locktypes.rst
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-01-10 09:56:57 +0100
committerJiri Kosina <jkosina@suse.cz>2022-01-10 09:56:57 +0100
commit3551a3ff8229e15d2a4b47b8234923bc72da65ef (patch)
treea62465753397b0268529a5d0b9ab43a8840069ad /Documentation/locking/locktypes.rst
parent906095af85e8b2e53ee9f8c50b3dff365aa09df8 (diff)
parent33a5c2793451770cb6dcf0cc35c76cfd4b045513 (diff)
downloadlinux-3551a3ff8229e15d2a4b47b8234923bc72da65ef.tar.gz
linux-3551a3ff8229e15d2a4b47b8234923bc72da65ef.tar.bz2
linux-3551a3ff8229e15d2a4b47b8234923bc72da65ef.zip
Merge branch 'for-5.17/letsketch' into for-linus
- new driver to support for LetSketch device (Hans de Goede)
Diffstat (limited to 'Documentation/locking/locktypes.rst')
-rw-r--r--Documentation/locking/locktypes.rst9
1 files changed, 3 insertions, 6 deletions
diff --git a/Documentation/locking/locktypes.rst b/Documentation/locking/locktypes.rst
index ddada4a53749..4fd7b70fcde1 100644
--- a/Documentation/locking/locktypes.rst
+++ b/Documentation/locking/locktypes.rst
@@ -439,11 +439,9 @@ preemption. The following substitution works on both kernels::
spin_lock(&p->lock);
p->count += this_cpu_read(var2);
-On a non-PREEMPT_RT kernel migrate_disable() maps to preempt_disable()
-which makes the above code fully equivalent. On a PREEMPT_RT kernel
migrate_disable() ensures that the task is pinned on the current CPU which
in turn guarantees that the per-CPU access to var1 and var2 are staying on
-the same CPU.
+the same CPU while the task remains preemptible.
The migrate_disable() substitution is not valid for the following
scenario::
@@ -456,9 +454,8 @@ scenario::
p = this_cpu_ptr(&var1);
p->val = func2();
-While correct on a non-PREEMPT_RT kernel, this breaks on PREEMPT_RT because
-here migrate_disable() does not protect against reentrancy from a
-preempting task. A correct substitution for this case is::
+This breaks because migrate_disable() does not protect against reentrancy from
+a preempting task. A correct substitution for this case is::
func()
{