|
Oliver Neukum |
1100a7 |
From b0b0aa5d858d4d2fe39a5e4486e0550e858108f6 Mon Sep 17 00:00:00 2001
|
|
Oliver Neukum |
1100a7 |
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Oliver Neukum |
1100a7 |
Date: Wed, 23 Nov 2022 21:18:31 +0100
|
|
Oliver Neukum |
1100a7 |
Subject: [PATCH] Documentation: Remove bogus claim about del_timer_sync()
|
|
Oliver Neukum |
1100a7 |
Git-commit: b0b0aa5d858d4d2fe39a5e4486e0550e858108f6
|
|
Oliver Neukum |
1100a7 |
References: git-fixes
|
|
Oliver Neukum |
1100a7 |
Patch-mainline: v6.2-rc1
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
del_timer_sync() does not return the number of times it tried to delete the
|
|
Oliver Neukum |
1100a7 |
timer which rearms itself. It's clearly documented:
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
The function returns whether it has deactivated a pending timer or not.
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
This part of the documentation is from 2003 where del_timer_sync() really
|
|
Oliver Neukum |
1100a7 |
returned the number of deletion attempts for unknown reasons. The code
|
|
Oliver Neukum |
1100a7 |
was rewritten in 2005, but the documentation was not updated.
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Oliver Neukum |
1100a7 |
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
|
|
Oliver Neukum |
1100a7 |
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
|
|
Oliver Neukum |
1100a7 |
Link: https://lore.kernel.org/r/20221123201624.452282769@linutronix.de
|
|
Oliver Neukum |
1100a7 |
Signed-off-by: Oliver Neukum <oneukum@suse.com>
|
|
Oliver Neukum |
1100a7 |
---
|
|
Oliver Neukum |
1100a7 |
Documentation/kernel-hacking/locking.rst | 3 +--
|
|
Oliver Neukum |
1100a7 |
Documentation/translations/it_IT/kernel-hacking/locking.rst | 4 +---
|
|
Oliver Neukum |
1100a7 |
2 files changed, 2 insertions(+), 5 deletions(-)
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
index 6805ae6e86e6..b26e4a3a9b7e 100644
|
|
Oliver Neukum |
1100a7 |
--- a/Documentation/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
+++ b/Documentation/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
@@ -1006,8 +1006,7 @@ Another common problem is deleting timers which restart themselves (by
|
|
Oliver Neukum |
1100a7 |
calling add_timer() at the end of their timer function).
|
|
Oliver Neukum |
1100a7 |
Because this is a fairly common case which is prone to races, you should
|
|
Oliver Neukum |
1100a7 |
use del_timer_sync() (``include/linux/timer.h``) to
|
|
Oliver Neukum |
1100a7 |
-handle this case. It returns the number of times the timer had to be
|
|
Oliver Neukum |
1100a7 |
-deleted before we finally stopped it from adding itself back in.
|
|
Oliver Neukum |
1100a7 |
+handle this case.
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
Locking Speed
|
|
Oliver Neukum |
1100a7 |
=============
|
|
Oliver Neukum |
1100a7 |
diff --git a/Documentation/translations/it_IT/kernel-hacking/locking.rst b/Documentation/translations/it_IT/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
index 51af37f2d621..eddfba806e13 100644
|
|
Oliver Neukum |
1100a7 |
--- a/Documentation/translations/it_IT/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
+++ b/Documentation/translations/it_IT/kernel-hacking/locking.rst
|
|
Oliver Neukum |
1100a7 |
@@ -1027,9 +1027,7 @@ Un altro problema è l'eliminazione dei temporizzatori che si riavviano
|
|
Oliver Neukum |
1100a7 |
da soli (chiamando add_timer() alla fine della loro esecuzione).
|
|
Oliver Neukum |
1100a7 |
Dato che questo è un problema abbastanza comune con una propensione
|
|
Oliver Neukum |
1100a7 |
alle corse critiche, dovreste usare del_timer_sync()
|
|
Oliver Neukum |
1100a7 |
-(``include/linux/timer.h``) per gestire questo caso. Questa ritorna il
|
|
Oliver Neukum |
1100a7 |
-numero di volte che il temporizzatore è stato interrotto prima che
|
|
Oliver Neukum |
1100a7 |
-fosse in grado di fermarlo senza che si riavviasse.
|
|
Oliver Neukum |
1100a7 |
+(``include/linux/timer.h``) per gestire questo caso.
|
|
Oliver Neukum |
1100a7 |
|
|
Oliver Neukum |
1100a7 |
Velocità della sincronizzazione
|
|
Oliver Neukum |
1100a7 |
===============================
|
|
Oliver Neukum |
1100a7 |
--
|
|
Oliver Neukum |
1100a7 |
2.39.0
|
|
Oliver Neukum |
1100a7 |
|