Re: [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown() before freeing timer

Steven Rostedt <[email protected]>
Newsgroups org.kernel.vger.lvs-devel,dev.linux.lists.bridge,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-usb,org.kernel.vger.linux-wireless,org.kernel.vger.netfilter-devel
Message-ID <[email protected]>
On Thu, 27 Oct 2022 17:07:20 -0400
Steven Rostedt <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.