Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2971957rwi; Fri, 28 Oct 2022 13:56:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6T9/RAl/wsY5aoupHORuLQcXlTh0lO5F3nI6JwrMvbwBV9rXbjqOtGiwmjULW0GUz6S7jX X-Received: by 2002:a17:90a:5a02:b0:212:f91b:b2d0 with SMTP id b2-20020a17090a5a0200b00212f91bb2d0mr18731628pjd.244.1666990581666; Fri, 28 Oct 2022 13:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666990581; cv=none; d=google.com; s=arc-20160816; b=Tt9D4JAvhMGGG67eB46YSjHh5vPUlDBmgLzkGK3y4Btq4yUqbieL9c5ATfCQm2Aa49 qoA6PruOVih8rrvARTGDx/BnGSGB6iHCoPFs8NwjS11iCySPHzWe7Nd5KzdFoVeYOk/9 7GN/aX2p80lDkhaTQk/gJZalh9ub8yasXTkLborouLR+B3GrsVFjlgJKEQIDNnO/64Ak mQMMU3EPlO+PZXAloeyOPozDtR0rrRROW3ZSGRiQXoPXyoTc3SrThrUj1U3rI+fkwXMI 3RScV6TST8YnyS6HUYnvpe4Tyxo2ncvQ50mDhwCCZP/XXyAqd9vzGxqQdxsi0C7LbQ44 sBRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=G4h1SxRjbwfiiaLGvfBkANRnOpxTATmOK9plJpod8DM=; b=az3a1pHggyvi06827Ed9kcPm9TYv7nAS6BxBR6dNPQNPSWqHgVtfF/n+CiXU+22zP2 veqNRDXZ6oEuoCywU6sM6zUcgh3kxakgsHn10yr1Xo0BdFuveqr+MvkbBFDABiKXRLda fCIAmrAto9mRL0Cz072VlL87Fgo6u6ZCbMllMC3IGUgfbn0cdd8zw3dvqV9mDM5OtWAo 9TdgBr8IcJyL1M7Jr0kXkVU7MtVYKHmdSVv38IYLCZeYcdqDmB1VT1Ntl6oNU8v/oCmO Ypr55tITlK6PGAJYTc8meNqLkSniQ+P1fjh5UnSXzIUslRmihssXoFM5KsY9AMU/gqr1 CiGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g27-20020a63521b000000b0043c0b452d3esi6584138pgb.292.2022.10.28.13.56.05; Fri, 28 Oct 2022 13:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbiJ1UtY (ORCPT + 99 others); Fri, 28 Oct 2022 16:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiJ1UtK (ORCPT ); Fri, 28 Oct 2022 16:49:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AAB0248C95; Fri, 28 Oct 2022 13:48:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F2FF62A65; Fri, 28 Oct 2022 20:48:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07F03C433D6; Fri, 28 Oct 2022 20:48:53 +0000 (UTC) Date: Fri, 28 Oct 2022 16:49:10 -0400 From: Steven Rostedt To: Trond Myklebust Cc: "linux-kernel@vger.kernel.org" , Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna Schumaker , "linux-nfs@vger.kernel.org" Subject: Re: [RFC][PATCH v2 00/31] timers: Use del_timer_shutdown() before freeing timers Message-ID: <20221028164910.6804a855@gandalf.local.home> In-Reply-To: References: <20221027150525.753064657@goodmis.org> <20221028145005.28bc324d@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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-nfs@vger.kernel.org On Fri, 28 Oct 2022 20:12:30 +0000 Trond Myklebust wrote: > I seem to vaguely remember that at the time, del_timer_sync() would loop > in order to catch re-arming timers, whereas del_singleshot_timer_sync() > would not, hence the commit message. The expectation for > del_singleshot_timer_sync() was simply that the caller would ensure > safety against re-arming, which was indeed the case for this code. Well, that expectation didn't last long. Your commit was added on June 22, 2005. Then on June 23, 2005 (the next day!) this happened: 55c888d6d09a0 ("timers fixes/improvements") Which has: @@ -89,12 +77,12 @@ static inline void add_timer(struct timer_list * timer) #ifdef CONFIG_SMP extern int del_timer_sync(struct timer_list *timer); - extern int del_singleshot_timer_sync(struct timer_list *timer); #else # define del_timer_sync(t) del_timer(t) -# define del_singleshot_timer_sync(t) del_timer(t) #endif +#define del_singleshot_timer_sync(t) del_timer_sync(t) + So much or efficiency! :-) I guess converting it back to del_timer_sync() is the right thing to do regardless of this patch series. I'll send you a patch. -- Steve