From patchwork Wed Nov 23 20:18:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 628452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5756C433FE for ; Wed, 23 Nov 2022 20:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239223AbiKWUTs (ORCPT ); Wed, 23 Nov 2022 15:19:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239259AbiKWUSz (ORCPT ); Wed, 23 Nov 2022 15:18:55 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82C991C3D; Wed, 23 Nov 2022 12:18:33 -0800 (PST) Message-ID: <20221123201624.452282769@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669234711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=A2SY6j6h29m5XzjJBWQT9Lgn9maXUZXQdJe6ibdVF0Q=; b=oxrZpu8gy33vwLcTyeM9oUZzX6+fHMndkO85dqJdBjQrSOlDMZXxKsuysYXvvmQHsqdC1S dKmZpYRS9o//g+Tdxxsl3tdMHRDB2YGKAGnEx49qjFcr0Gi411RoXRYTsOxxswVKJax0CZ vduRr0EltYhwJQk6uWt+OB4vzGGMuKuDZIrGn1PmUj9YEv4vNktARpIEfHcJqkmECgFcBm +ehVfa4j/C9yB4fL3cStETcyNfdvCYhhQyw6Ac8e1BUk3vWTcJmynotgVrc6CglkAm/XeB j1CBJiGkmlaI1IxWLnv2jiCv/HSwdnC5Qfh4rV6zCBmvJv7FKJsyFk+GFnePqA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669234711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=A2SY6j6h29m5XzjJBWQT9Lgn9maXUZXQdJe6ibdVF0Q=; b=frCxv+JYFv1m5JDYMLoiXzjV44LB/mMTKPW9MZAUzVGCvutW27XlDRZ8jQv7X5I18KDaiL g2pBWVq5VkpFKbBg== From: Thomas Gleixner To: LKML Cc: Linus Torvalds , Steven Rostedt , Anna-Maria Behnsen , Peter Zijlstra , Stephen Boyd , Guenter Roeck , Andrew Morton , Julia Lawall , Arnd Bergmann , Viresh Kumar , Marc Zyngier , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Jacob Keller Subject: [patch V3 01/17] Documentation: Remove bogus claim about del_timer_sync() References: <20221123201306.823305113@linutronix.de> MIME-Version: 1.0 Date: Wed, 23 Nov 2022 21:18:31 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org del_timer_sync() does not return the number of times it tried to delete the timer which rearms itself. It's clearly documented: The function returns whether it has deactivated a pending timer or not. This part of the documentation is from 2003 where del_timer_sync() really returned the number of deletion attempts for unknown reasons. The code was rewritten in 2005, but the documentation was not updated. Signed-off-by: Thomas Gleixner Reviewed-by: Jacob Keller --- Documentation/kernel-hacking/locking.rst | 3 +-- Documentation/translations/it_IT/kernel-hacking/locking.rst | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) --- a/Documentation/kernel-hacking/locking.rst +++ b/Documentation/kernel-hacking/locking.rst @@ -1006,8 +1006,7 @@ Another common problem is deleting timer calling add_timer() at the end of their timer function). Because this is a fairly common case which is prone to races, you should use del_timer_sync() (``include/linux/timer.h``) to -handle this case. It returns the number of times the timer had to be -deleted before we finally stopped it from adding itself back in. +handle this case. Locking Speed ============= --- a/Documentation/translations/it_IT/kernel-hacking/locking.rst +++ b/Documentation/translations/it_IT/kernel-hacking/locking.rst @@ -1027,9 +1027,7 @@ Un altro problema è l'eliminazione dei da soli (chiamando add_timer() alla fine della loro esecuzione). Dato che questo è un problema abbastanza comune con una propensione alle corse critiche, dovreste usare del_timer_sync() -(``include/linux/timer.h``) per gestire questo caso. Questa ritorna il -numero di volte che il temporizzatore è stato interrotto prima che -fosse in grado di fermarlo senza che si riavviasse. +(``include/linux/timer.h``) per gestire questo caso. Velocità della sincronizzazione ===============================