From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 631A2606B0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9E3A96068F Date: Thu, 27 Oct 2022 17:15:55 -0400 From: Steven Rostedt Message-ID: <20221027171555.7fcd27ee@gandalf.local.home> In-Reply-To: <20221027170720.31497319@gandalf.local.home> References: <20221027150525.753064657@goodmis.org> <20221027150928.780676863@goodmis.org> <20221027155513.60b211e2@gandalf.local.home> <20221027163453.383bbf8e@gandalf.local.home> <20221027170720.31497319@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown() before freeing timer List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Linus Torvalds Cc: Alexei Starovoitov , Eric Dumazet , Tony Nguyen , linux-afs@lists.infradead.org, Menglong Dong , bridge@lists.linux-foundation.org, Jesse Brandeburg , lvs-devel@vger.kernel.org, coreteam@netfilter.org, Jakub Kicinski , Paolo Abeni , Guenter Roeck , Martin KaFai Lau , Kuniyuki Iwashima , Thomas Gleixner , Mirko Lindner , linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net, Stephen Boyd , linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , netfilter-devel@vger.kernel.org, Pavel Begunkov On Thu, 27 Oct 2022 17:07:20 -0400 Steven Rostedt wrote: > > And maybe that function can also disallow any future re-arming even > > for the case where the timer couldn't be actively removed. The naming of the functions will depend on this. If the async version always shuts down the timer, then we should have the interface be: del_timer_shutdown() <- async del_timer_shutdown_sync <- sync As it would match the del_timer() and del_timer_sync() semantics. If shutdown only happens if the timer is removed, then I believe the current approach of del_timer_shutdown() being synchronous and del_timer_try_shutdown() being async is the way to go, as it follows more the semantics of mutex_lock() and mutex_trylock(). -- Steve