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: 25186 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3008518wrr; Wed, 23 Nov 2022 12:21:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wPSYeR3yWPGV7+GmWxi2JVfSl2zDmBDXpT+H5k7w/ak85siEM6Vn4Yc/n7qNfxK3zzvMw X-Received: by 2002:a17:906:c2d8:b0:7ba:5983:ebb5 with SMTP id ch24-20020a170906c2d800b007ba5983ebb5mr2631887ejb.646.1669234883492; Wed, 23 Nov 2022 12:21:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669234883; cv=none; d=google.com; s=arc-20160816; b=jYG6Vkc0DqwrD+OnAqq0/NXcqXhN5Dlbey5ClP8rhC0kPlzwbbr9GLYDBxW30m5zvy UAGhMFSyBQMy+Or71Pqfi1rTjsp4Z2O5Eon/iFjIU2jRArz10QnwArGocxFjXegXDPp5 2DMTyYlPSuUMsi6roAVDjUikhRG5F12kLk6OITOCuwTjkm9Ym3zfuYw1bCpKWL27KMBJ faQE/Sm/P5zw6FQl0Lao3qbxVZauJnrSRmewuV5WN9KL+6GMfrZlqxoMokKX3JIx0xf6 qIXQZ3h+WSNbURxRqBTX5r6VZRFcKSsQ4lgcvpmT7NLc4cBKiaGCAkKcMgUFdfw+0+iz Zecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:content-transfer-encoding:mime-version :references:subject:cc:to:from:dkim-signature:dkim-signature :message-id; bh=A2SY6j6h29m5XzjJBWQT9Lgn9maXUZXQdJe6ibdVF0Q=; b=aE8QkrQ9/zzrwUU3eH8OoCmSfdpF3hUu+P5NwV6jFKbkAhCLI60hwbHwCyQNvRsnCO UbK/1weKKj7meE8sNTN40WrE0tAcJK81Y0qm6EaGNb7JU7C6S/f0fTGYf7UuhmBlWi3u wwKjcXJYg6GLA075S2z6uA1bLHcSJSigyTyWav+45rnCJ90zuE30oVznx6qrkHk5rxSE GS0IHbhHOMFPw8FYyoyaQkh5hJ7XEe5Ld5D/NrdhROO9n+9CTBQmls7H13JZK8xO1fzQ sPde2AQ2AxihZ55ecVgCCciV/PGnhuSHHewWdFQwMzTBTPDBQUGh4iDikEomIi60hcvY Nc5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oxrZpu8g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=frCxv+JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs18-20020a170906dc9200b0078a4aad3141si10084647ejc.211.2022.11.23.12.20.57; Wed, 23 Nov 2022 12:21:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oxrZpu8g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=frCxv+JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239374AbiKWUTt (ORCPT + 99 others); Wed, 23 Nov 2022 15:19:49 -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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750319636835154798?= X-GMAIL-MSGID: =?utf-8?q?1750319636835154798?= 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 ===============================